Refactoring: fix rendering artefact when switching selected element

This commit is contained in:
Pieter Vander Vennet 2023-04-21 00:25:56 +02:00
parent c6e12fdd6b
commit 3aeedf22c8
4 changed files with 27 additions and 14 deletions

View file

@ -302,6 +302,10 @@ export default class ThemeViewState implements SpecialVisualizationState {
})
return
}
// We first clear the selection to make sure no weird state is around
this.selectedLayer.setData(undefined)
this.selectedElement.setData(undefined)
this.selectedElement.setData(feature)
this.selectedLayer.setData(last_click_layer.layerDef)
},