UX: work on layout

This commit is contained in:
Pieter Vander Vennet 2024-06-16 19:00:43 +02:00
parent a87e3376e0
commit d6a20b7222
43 changed files with 5086 additions and 838 deletions

View file

@ -21,10 +21,21 @@
selectedElement.properties.id
)
let layer: LayerConfig =
selectedElement.properties.id === "settings"
? UserRelatedState.usersettingsConfig
: state.layout.getMatchingLayer(tags.data)
function getLayer(properties: Record<string, string>){
if(properties.id === "settings"){
return UserRelatedState.usersettingsConfig
}
if (properties.id === "new_point_dialog") {
return state.layout.layers.find((l) => l.id === "last_click")
}
if (properties.id === "location_track") {
return state.layout.layers.find((l) => l.id === "gps_track")
}
return state.layout.getMatchingLayer(properties)
}
let layer: LayerConfig = getLayer(selectedElement.properties)
let stillMatches = tags.map(
(tags) => !layer?.source?.osmTags || layer.source.osmTags?.matchesProperties(tags)