zoomAbs, smoothZoom, moveTo etc weird effects
mainiomooses opened this issue · comments
Using zoomAbs, smoothZoom, moveTo etc. results in unexpected behavior. It's hard to explain, so here's a video capture with pressing a button to trigger zoomAbs(0, 0, 1) on the instance.
The results range from nothing happening to the instance zooming/panning in/out in a manner I can't explain. Triggering smoothZoom, moveTo etc. result in nigh similar behavior.
Link to video (Youtube): https://youtu.be/dVrrnDt_HNA
Closed: The issue had an overlapping issue with the doubleclick zoom engaging through the "Return to center"-button.
Closed: The issue premise was faulty, since the move/zoom functions work with x/y coords as they are relative to the current zoom level. Thus an x/y of 0,0 is a different place at different Zoom levels. Note: The zoom factor used in the move/zoom functions is a factor in relation to the current zoom level; not an absolute value relating to a default level.
Solved: I removed doubleclick zooming as it was not needed in my project - and as panzoom has no "reset()" etc method, I just dispose() of the whole panzoom and then reinitialize it - resetting the map on center.