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,7 +10,6 @@
|
||||||
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig"
|
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig"
|
||||||
|
|
||||||
export let state: SpecialVisualizationState
|
export let state: SpecialVisualizationState
|
||||||
export let layer: LayerConfig
|
|
||||||
export let selectedElement: Feature
|
export let selectedElement: Feature
|
||||||
export let highlightedRendering: UIEventSource<string> = undefined
|
export let highlightedRendering: UIEventSource<string> = undefined
|
||||||
|
|
||||||
|
@ -18,6 +17,8 @@
|
||||||
selectedElement.properties.id
|
selectedElement.properties.id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
let layer: LayerConfig =state.layout.getMatchingLayer(tags.data)
|
||||||
|
|
||||||
|
|
||||||
let stillMatches = tags.map(tags => !layer?.source?.osmTags || layer.source.osmTags?.matchesProperties(tags))
|
let stillMatches = tags.map(tags => !layer?.source?.osmTags || layer.source.osmTags?.matchesProperties(tags))
|
||||||
|
|
||||||
|
|
|
@ -402,7 +402,7 @@
|
||||||
<div slot="close-button" />
|
<div slot="close-button" />
|
||||||
<div class="normal-background absolute flex h-full w-full flex-col">
|
<div class="normal-background absolute flex h-full w-full flex-col">
|
||||||
<SelectedElementTitle {state} layer={$selectedLayer} selectedElement={$selectedElement} />
|
<SelectedElementTitle {state} layer={$selectedLayer} selectedElement={$selectedElement} />
|
||||||
<SelectedElementView {state} layer={$selectedLayer} selectedElement={$selectedElement} />
|
<SelectedElementView {state} selectedElement={$selectedElement} />
|
||||||
</div>
|
</div>
|
||||||
</ModalRight>
|
</ModalRight>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in a new issue