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

Avoid white space when resizing map on web #474

Merged

Conversation

jrehwaldt
Copy link
Contributor

@jrehwaldt jrehwaldt commented Dec 4, 2020

When resizing the browser screen Flutter fires several resize events.
These events are properly propagated to the containing div, but not
always handled by the map. It appears Mapbox misses the last resize event.
Therefore, we fire a timer that will check for mismatching width/height
between mapbox and it's container and trigger an additional resizing.

To reproduce: Open example/FullMapPage and resize the window fast,
e.g. by mouse or by maximising the window. When increasing the window
size the right/bottom area of the map will stay white.

The issue can be easily reproduced in Safari and Chrome.

Jan Oopkaup added 2 commits December 4, 2020 13:59
When resizing the browser screen Flutter fires several resize events.
These events are properly propagated to the containing div, but not
always by the map. It appears Mapbox misses the last resize event.
Therefore, we fire a timer that will check for mismatching width/height
between mapbox and it's container and trigger an additonal resizing.
Copy link
Collaborator

@tobrun tobrun left a comment

Choose a reason for hiding this comment

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

Thank you for contributing!

@tobrun tobrun merged commit f3403d1 into flutter-mapbox-gl:master Dec 19, 2020
@jrehwaldt jrehwaldt deleted the fix-white-space-when-resizing-on-web branch February 10, 2021 07:39
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.

None yet

2 participants