anvaka / panzoom

Universal pan and zoom library (DOM, SVG, Custom)
https://anvaka.github.io/panzoom/demo/attach-via-script.html
MIT License
1.79k stars 287 forks source link

smoothMoveTo and moveTo move dom to different place with same x y #297

Open SLEEPYkoa1a opened 1 year ago

SLEEPYkoa1a commented 1 year ago

When I use moveTo and smoothMoveTo before smoothZoom, like panZoomInstance.moveTo(60, 60); panZoomInstance.smoothZoom(30, 30, 1/2); and panZoomInstance.smoothMoveTo(60, 60); panZoomInstance.smoothZoom(30, 30, 1/2); the dom will stop at different place, and moveTo reach the right place I expected. Looks like something wrong happended in smoothMoveTo method. Is there someone has the same question?