Skip to content

LayerControl: fix visibility on multiple renders#1674

Merged
Conengmo merged 1 commit intopython-visualization:mainfrom
Conengmo:layercontrol-fix-multiple-renders
Nov 29, 2022
Merged

LayerControl: fix visibility on multiple renders#1674
Conengmo merged 1 commit intopython-visualization:mainfrom
Conengmo:layercontrol-fix-multiple-renders

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