selected_element layer which highlights the selected element

This commit is contained in:
Pieter Vander Vennet 2022-12-09 13:58:41 +01:00
parent e8ff43312f
commit 42bd301389
13 changed files with 146 additions and 32 deletions

View file

@ -123,6 +123,9 @@ export default class DefaultGUI {
addNewPoint,
hasPresets ? new AddNewMarker(state.filteredLayers) : noteMarker
)
state.LastClickLocation.addCallbackAndRunD(_ => {
ScrollableFullScreen.collapse()
})
}
if (noteLayer !== undefined) {
@ -153,6 +156,16 @@ export default class DefaultGUI {
state,
})
const selectedElement: FilteredLayer = state.filteredLayers.data.filter(
(l) => l.layerDef.id === "selected_element"
)[0]
new ShowDataLayer({
leafletMap: state.leafletMap,
layerToShow: selectedElement.layerDef,
features: state.selectedElementsLayer,
state
})
state.leafletMap.addCallbackAndRunD((_) => {
// Lets assume that all showDataLayers are initialized at this point
state.selectedElement.ping()