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

LayerControl: fix visibility on multiple renders #1674

Merged

Conversation

Conengmo
Copy link
Member

Closes #1199

LayerControl has instance attributes that we fill when the render method is called. That means that if render is called multiple times, those attributes are changed multiple times. This leads to bugs.

The desired behavior is that each time render is called, the instance attributes act as if the instance was freshly created. Achieve this by calling the reset method at the beginning of the render method. This way, each time render is called, empty instance attributes are used.

@Conengmo Conengmo merged commit 7bd9e8e into python-visualization:main Nov 29, 2022
@Conengmo Conengmo deleted the layercontrol-fix-multiple-renders branch November 29, 2022 16:05
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.

Strange behaviour using multiple tilelayers and control layer
2 participants