ThibaultJanBeyer / DragSelect

An easy JavaScript library for selecting and moving elements. With no dependencies. Drag-Select & Drag-And-Drop. – Examples:
https://dragselect.com/
Other
715 stars 81 forks source link

Fix for selection area being faulty if any ancestor node has been scrolled. #179

Closed fredrikvin closed 1 year ago

fredrikvin commented 1 year ago

Interaction: Call Area.reset and SelectorArea.updatePos on Interaction start to make sure selection area is up to date after scrolling any DragSelect area ancestor.

Without fix DragSelect area doesn't align with area node after scrolling ancestor.

ThibaultJanBeyer commented 1 year ago

Hi @fredrikvin thanks for the PR!

This should theoretically be fixed by adding a ResizeObserver in addModificationObservers which I’ll do here for v3. However, since I have no reproducible example I can’t reproduce it. Would you mind providing a minimal example for this? Feel free to fork an existing codepen for that if it helps you. Thank you! :)

Until I have an example for this I’ll close the PR