Refactoring: calculate selected layer in selected element view
This commit is contained in:
parent
27d99a2953
commit
9df228ac5d
2 changed files with 3 additions and 2 deletions
|
@ -10,13 +10,14 @@
|
|||
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig"
|
||||
|
||||
export let state: SpecialVisualizationState
|
||||
export let layer: LayerConfig
|
||||
export let selectedElement: Feature
|
||||
export let highlightedRendering: UIEventSource<string> = undefined
|
||||
|
||||
export let tags: UIEventSource<Record<string, string>> = state.featureProperties.getStore(
|
||||
selectedElement.properties.id
|
||||
)
|
||||
|
||||
let layer: LayerConfig =state.layout.getMatchingLayer(tags.data)
|
||||
|
||||
|
||||
let stillMatches = tags.map(tags => !layer?.source?.osmTags || layer.source.osmTags?.matchesProperties(tags))
|
||||
|
|
|
@ -402,7 +402,7 @@
|
|||
<div slot="close-button" />
|
||||
<div class="normal-background absolute flex h-full w-full flex-col">
|
||||
<SelectedElementTitle {state} layer={$selectedLayer} selectedElement={$selectedElement} />
|
||||
<SelectedElementView {state} layer={$selectedLayer} selectedElement={$selectedElement} />
|
||||
<SelectedElementView {state} selectedElement={$selectedElement} />
|
||||
</div>
|
||||
</ModalRight>
|
||||
{/if}
|
||||
|
|
Loading…
Reference in a new issue