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

Fix bounds/fitBounds not working on first display. #1413

Merged
merged 2 commits into from
Dec 11, 2022

Conversation

ibrierley
Copy link
Collaborator

fitbounds doesn't work on initial frame when its on a fast device as it tries to display before it can get a size of the device, due to the nature of a layout builder. This tries to rectify one of the checks to toggle when a size is available for bounds checking.

Please test this thoroughly on mobile and on web. Pay especial attention for first frame adjustment flicker that could be annoying, checking that bounds in MapOptions behaves correctly.

@shahpasandar
Copy link

shahpasandar commented Dec 11, 2022

I had #409 when I updated to v3.0.0. I tested this pr and the issue was gone.

@mootw
Copy link
Collaborator

mootw commented Dec 11, 2022

LGTM

I did NOT have #409 but have tested this code in my app and it looks good!

Copy link
Member

@JaffaKetchup JaffaKetchup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested (sorry, still quite busy rn), submitting approval on behalf of @moonag :)

@JaffaKetchup
Copy link
Member

@ibrierley Feel free to merge

@ibrierley ibrierley merged commit 89f6c2b into fleaflet:master Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants