You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
map.on( 'moveend', e => {
if (e.isAnimation) {
map.boxZoom.enable();
map.scrollZoom.enable();
map.dragPan.enable();
map.dragRotate.enable();
map.keyboard.enable();
map.doubleClickZoom.enable();
map.touchZoomRotate.enable();
}
})
However this works differently depending on interactive flag set on map creation.
If set interactive: false, map behaves as expected: it stops interactions when animation starts and enable them back when animation ends.
if set interactive: true, manually disabled interactions still can interrupt animation and moveend event will be fired before animation has reached the end point.
Just looking at bind_handlers.js and indeed it seems like we don't really care about the handlers' enabled/disabled state but rather rely on options.interactive to decide whether or not to stop the animation. We should definitely still look into refactoring handlers overall, but for now I think we can fix this with some extra checks in there. Self-assigning this as part of the other UI stuff I'm working on.
This has been fixed by #9365. If you have a chance to test and confirm, that would be great! The fix is in master and will be released in a beta release tomorrow.
I'm trying to prevent interruptions of
easeTo
animation, so I disable map interactions when runeaseTo
and enable them back when animation ends.Disable interactions:
Enable interactions:
However this works differently depending on
interactive
flag set on map creation.If set
interactive: false
, map behaves as expected: it stops interactions when animation starts and enable them back when animation ends.if set
interactive: true
, manually disabled interactions still can interrupt animation andmoveend
event will be fired before animation has reached the end point.https://jsfiddle.net/8sajomqv/
The text was updated successfully, but these errors were encountered: