anseki / plain-draggable

The simple and high performance library to allow HTML/SVG element to be dragged.
https://anseki.github.io/plain-draggable/
MIT License
773 stars 99 forks source link

Draggable Collision Control #131

Closed vukic-makro closed 1 year ago

vukic-makro commented 1 year ago

Is there any way that when we have multiple dragable elements on the page none of them can go over each other but they would rather "collide". Like they would just touch border of one another and that's it, no snapping no nothing, just stop there if that happened?

anseki commented 1 year ago

Hi @vukic-makro, thank you for the comment. You can use left / top properties.

vukic-makro commented 1 year ago

Awesome, thanks!

anseki commented 1 year ago

:smile: