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

[Bug]: Map markers don't always render in the same order #2560

Open
zachstence opened this issue Sep 19, 2024 · 0 comments
Open

[Bug]: Map markers don't always render in the same order #2560

zachstence opened this issue Sep 19, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers to-review Evidence team to review ui/data Charts, tables and other viz

Comments

@zachstence
Copy link
Member

Describe the bug

When using a BaseMap with multiple Bubbles/Points, the components don't always mount in the same order, and thus the CircleMarkers added to the map aren't consistently ordered.

Steps to Reproduce

Load the BaseMap story a couple times and see that sometimes the red dots are underneath the blue bubbles, sometimes they are on top.

image

image

Logs

No response

System Info

No response

Severity

annoyance

Additional Information, or Workarounds

Frustratingly, CircleMarker doesn't have zIndexOffset like Marker has

I think the best solution here is to map.createPane for each Bubbles/Points component that is used, and then adjust the z-index of the panes based on their appearance in the DOM (not sure how to do this, but a hacky solution could be rendering some invisible divs and checking their order).

@zachstence zachstence added bug Something isn't working to-review Evidence team to review good first issue Good for newcomers ui/data Charts, tables and other viz and removed to-review Evidence team to review labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers to-review Evidence team to review ui/data Charts, tables and other viz
Projects
None yet
Development

No branches or pull requests

1 participant