Many tweaks to use MC in an iframe with less clutter

This commit is contained in:
Pieter Vander Vennet 2024-06-27 17:37:34 +02:00
parent 894b0d45ca
commit f88cb9a730
19 changed files with 384 additions and 236 deletions

View file

@ -100,15 +100,21 @@
})
let selectedLayer: Store<LayerConfig> = state.selectedElement.mapD((element) => {
if (element.properties.id.startsWith("current_view")) {
const id = element.properties.id
if (id.startsWith("current_view")) {
return currentViewLayer
}
if (element.properties.id.startsWith(LastClickFeatureSource.newPointElementId)) {
if(id.startsWith("summary_")){
console.log("Not selecting a summary object. The summary object is", element)
return undefined
}
if (id.startsWith(LastClickFeatureSource.newPointElementId)) {
return layout.layers.find((l) => l.id === "last_click")
}
if (element.properties.id === "location_track") {
if (id === "location_track") {
return layout.layers.find((l) => l.id === "gps_track")
}
return state.layout.getMatchingLayer(element.properties)
})
let currentZoom = state.mapProperties.zoom