Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flying ends on window resize and browser zoom change #4041

Closed
clif-os opened this issue Jan 24, 2017 · 3 comments · Fixed by #6636
Closed

Flying ends on window resize and browser zoom change #4041

clif-os opened this issue Jan 24, 2017 · 3 comments · Fixed by #6636

Comments

@clif-os
Copy link

clif-os commented Jan 24, 2017

0.31.0:

Steps to Trigger Behavior

  1. start a flying event
  2. resize the window or change the browser zoom level

Expected Behavior

I expect that the flying event would continue as normal

Actual Behavior

The flying event ends mid-flight

Flight end on window resize: https://gyazo.com/6fc4e12952b42a6ac1ffe5e790bbb39e

@mollymerp
Copy link
Contributor

Yes, I have noticed this as well. Any keyboard/mouse map interaction cancels an in progress animation. We should probably document or fix this behavior.

@andrewharvey
Copy link
Collaborator

andrewharvey commented Jan 16, 2018

This is the root cause for the Mapbox Geocoder not working on Android, so fixing this (ensuring camera animations continue even while the window is resizing) should fix #4481.

@andrewharvey
Copy link
Collaborator

andrewharvey commented Apr 11, 2018

Investigating this, removing the stop() call at

this.stop().resize()._update();
prevents the flyTo from stopping due to a browser window resize.

It doesn't seem to have any ill affects doing this apart from scroll zoom no longer cancelling the animation. Panning will still cancel the animation.

Doing this it looses the logic which retains the center when resizing, but that might be fixable, and at least is no worse than the current bug.

Since the current behaviour causes #4481 which I feel is a pretty serious bug, are there any thoughts on pushing through this fix with a bit more testing and polish?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants