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

Execute DOM queue tasks immediately before initial map load #11025

Merged
merged 2 commits into from Sep 16, 2021

Conversation

rreusser
Copy link
Contributor

@rreusser rreusser commented Sep 15, 2021

This PR addresses #11020, in which the DOM queue doesn't begin executing until map rendering starts. Thus, popups, markers, and the navigation control don't show the correct initial state until the map loads. This PR sidesteps the DOM queue and executes immediately before that initial load, so that markers immediately show up in the correct location without having to use a workaround like hiding them until initial load.

Before:

map-load-pre-fix

After:
load-with-fix

Launch Checklist

  • briefly describe the changes in this PR
  • include before/after visuals or gifs if this PR includes visual changes
  • write tests for all new functionality
  • document any changes to public APIs
  • post benchmark scores
  • manually test the debug page
  • tagged @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes
  • tagged @mapbox/gl-native if this PR includes shader changes or needs a native port
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>Fix regression in marker positioning before initial map load</changelog>

@rreusser rreusser changed the title Ricky/dont queue marker position until load Execute DOM queue tasks immediately before map load Sep 15, 2021
@rreusser rreusser changed the title Execute DOM queue tasks immediately before map load Execute DOM queue tasks immediately before initial map load Sep 15, 2021
Copy link
Member

@mourner mourner left a comment

Choose a reason for hiding this comment

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

👍 nice workaround!

@rreusser rreusser merged commit ac1c9d8 into main Sep 16, 2021
@rreusser rreusser deleted the ricky/dont-queue-marker-position-until-load branch September 16, 2021 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants