Skip to content

bounds initializes incorrectly in hidden tabs #150

@CIOData

Description

@CIOData

I am having an issue with maps fitting to their bounds correctly when they are in a tab. My understanding is that this is because they are rendering to a container of size 0x0 when hidden and not updating when the container gets resized. I know I could "fix" this downstream by having the map resize to bounds after some other user action, but that's not desirable. The leaflet package has some sort of workaround that invalidates the initial size when the container is activated. I would love if this functionality could be added to mapgl as well. Thanks.

Fit on active tab at start:

Image

Fit on tab hidden at start when activated:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions