Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

✨ Added auto-scroll when dragging gallery images #1083

Merged
merged 7 commits into from
Dec 13, 2018

Conversation

kevinansfield
Copy link
Collaborator

no issue

Adds auto-scroll if the mouse is placed near the top or bottom of the window whilst dragging an image to re-order it within a gallery. Useful when the position you want to drag to is not currently on screen.

  • append drop indicator element to .koenig-editor element to account for scrolling (also fixes indicator positioning bug with current implementation if you use mouse-wheel or keyboard to scroll the page whilst dragging)
  • generalise getParent util to accept a
    • switch to using selectors rather than dataset for finding parent draggable/droppable/container
  • add a ScrollHandler class that is used by the koenigDragDropHandler service to trigger scrolling whilst dragging

@coveralls
Copy link

coveralls commented Dec 12, 2018

Coverage Status

Coverage remained the same at 71.34% when pulling a0d8bf1 on kevinansfield:dnd-autoscroll into cce8738 on TryGhost:master.

@kevinansfield kevinansfield merged commit f51c9dd into TryGhost:master Dec 13, 2018
@kevinansfield kevinansfield deleted the dnd-autoscroll branch December 13, 2018 12:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants