-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
don't stop animation on map resize #6636
Conversation
I can't wait for this to land! I need this fix! |
I'm not too familiar with the animation/interaction code, so not sure if there are any implications of this change I've overlooked. |
if (options.interactive) { | ||
map.stop(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related to the resize fix or something separate?
No need to split it out if it's separate, I'm just wondering if I'm missing a relation between this and the resize bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I needed this so that scrolling on the map cancelled an active flyTo.
@mollymerp nah, I think this is fine. If it doesn't finish in the right location we should try to fix that but this seems fine to me. |
8872f48
to
ec207cd
Compare
test-flow is failing with:
🤔 |
@andrewharvey I think flow was confused by returning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Any idea when this fix will be released? |
https://github.com/mapbox/mapbox-gl-js/releases/tag/v0.47.0-beta.1 contains a fix for mapbox/mapbox-gl-js#6636. Without this, the search is broken on Android.
https://github.com/mapbox/mapbox-gl-js/releases/tag/v0.47.0-beta.1 contains a fix for mapbox/mapbox-gl-js#6636. Without this, the search is broken on Android.
This is a little tangential, but what is the behavior called when MapboxGL (or WebGL) pauses animation (or rendering) when the window/tab isn't "active" (isn't visible in the user's desktop)? Having an automation issue, and trying to find the correct language to understand... |
AFAIK, we (and WebGL) do not pause rendering on background tabs. Processes in background tabs are throttled as the default behavior of many modern browsers for performance reasons. |
@ryanhamley thank you! Makes sense that it's way lower level than a MapboxGL thing. EDIT: https://winaero.com/blog/disable-tab-throttling-google-chrome/ |
Launch Checklist
closes Flying ends on window resize and browser zoom change #4041
closes Geocoder control's flyTo animation on result selection gets interrupted on Android devices #4481
allows animations from flyTo to continue even when the map resizes. You can end up with the point you're flyingTo no longer being inside the map window if the map is resized a lot, but I feel it's no worse than the current behaviour, something than can be fixed in a future PR, and addresses the root cause of mapbox-gl-geocoder not working on Android.
write tests for all new functionality
check new unit test fails on master without this change
n/a document any changes to public APIs
n/a post benchmark scores
manually test the debug page
n/a tagged
@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changes