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

Need onSnap event. #45

Closed dr-error closed 4 years ago

dr-error commented 4 years ago

Hi, I am trying to attach a sound effect 'on snap'. Can you point me in a direction on how to do this with the current code? I'm aware of the onDragEnd event. I like to catch a snap while dragging. Maybe can you add an onSnap event in a future release? Or maybe it can be added as a property to the onMove event? I love plain-draggable very much so far! Thx, Marco

anseki commented 4 years ago

Hi @dr-error, thank you for the comment. The snapped property in onMove event that you want is already supported. See document: https://anseki.github.io/plain-draggable/#options-onmove

dr-error commented 4 years ago

Thank you for your fast reply! I missed the snapped property. No further issues.

anseki commented 4 years ago

:smile: