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
765 stars 96 forks source link

With CSS `scale` #87

Closed namasher closed 3 years ago

namasher commented 3 years ago

Hi nice job with this library. I'm facing an issue where the draggable element disappears from the container div. It changes the position when the div is scaled up or down. Do you know how I can prevent this from happening and that the draggable elements inside the div keeps working after a new scale is applied? Thanks!

anseki commented 3 years ago

Hi @namasher, thank you for the comment. To reproduce that, could you show an example by using e.g. https://jsfiddle.net/ ?

namasher commented 3 years ago

Hi @anseki thank you for the fast answer. I made this example: https://jsfiddle.net/8k0wd4jy/10/

If I change the scale of the container on the CSS the draggable elements starts to miss behave it will go outside the container boundaries, the pointer is lost and it can even dissapear, hope my example is useful to understand my issue. Thanks!

anseki commented 3 years ago

This may help you: https://github.com/anseki/plain-draggable/issues/13

anseki commented 3 years ago

No reply came, then this abandoned issue is closed.