-
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
map.fitBounds(...) behaves differently in v 1.9.0 #9477
Labels
Comments
Yep, I think I know where this is coming from! |
10 tasks
10 tasks
Thanks for the detailed bugreport! fix has been merged and is going out in the |
rlue
added a commit
to rlue/sdaqs-sada
that referenced
this issue
Jun 7, 2020
Version 1.8.0 of mapboxgl-js does not support a "padding" option for the .flyTo() function. Newer versions (up to 1.11.0-beta.1 as of this writing) fix this, but come with a strange bug: padding works perfectly initially, but once a base has been selected for the first deployment, all subsequent flyTo/fitBounds calls are off-center. (My suspicion is that it's related to mapbox-gl-js #9477,[0] in which padding is applied twice...?) [0]: mapbox/mapbox-gl-js#9477
rlue
added a commit
to rlue/sdaqs-sada
that referenced
this issue
Jun 12, 2020
Version 1.8.0 of mapboxgl-js does not support a "padding" option for the .flyTo() function. Newer versions (up to 1.11.0-beta.1 as of this writing) fix this, but come with a strange bug: padding works perfectly initially, but once a base has been selected for the first deployment, all subsequent flyTo/fitBounds calls are off-center. (My suspicion is that it's related to mapbox-gl-js #9477,[0] in which padding is applied twice...?) [0]: mapbox/mapbox-gl-js#9477
rlue
added a commit
to rlue/sdaqs-sada
that referenced
this issue
Nov 6, 2020
Version 1.8.0 of mapboxgl-js does not support a "padding" option for the .flyTo() function. Newer versions (up to 1.11.0-beta.1 as of this writing) fix this, but come with a strange bug: padding works perfectly initially, but once a base has been selected for the first deployment, all subsequent flyTo/fitBounds calls are off-center. (My suspicion is that it's related to mapbox-gl-js #9477,[0] in which padding is applied twice...?) [0]: mapbox/mapbox-gl-js#9477
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mapbox-gl-js version: 1.9.0
browser: Chrome 80.0
Steps to Trigger Behavior
map.fitBounds(bbox, { padding: { top: 200, left: 0, right: 0, bottom: 0 })
Link to Demonstration
v 1.9.0: https://jsfiddle.net/Lozwbnq5/2/
v 1.8.1: https://jsfiddle.net/pd6o2Ljc/2/
Expected Behavior
Both should behave the same; the behavior in v 1.8.1 seems more proper.
Actual Behavior
In version 1.9.0, the bounds from the top seem to be double (400px).
I believe this issue was introduced in #8638
The text was updated successfully, but these errors were encountered: