From 9df228ac5df626bad8a643dd8ebcbf0330ea2a4d Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 28 Feb 2024 02:09:27 +0100 Subject: [PATCH] Refactoring: calculate selected layer in selected element view --- src/UI/BigComponents/SelectedElementView.svelte | 3 ++- src/UI/ThemeViewGUI.svelte | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UI/BigComponents/SelectedElementView.svelte b/src/UI/BigComponents/SelectedElementView.svelte index c9b1afd7b..5965e7745 100644 --- a/src/UI/BigComponents/SelectedElementView.svelte +++ b/src/UI/BigComponents/SelectedElementView.svelte @@ -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 = undefined export let tags: UIEventSource> = 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)) diff --git a/src/UI/ThemeViewGUI.svelte b/src/UI/ThemeViewGUI.svelte index 2dac52e78..4cd7ea378 100644 --- a/src/UI/ThemeViewGUI.svelte +++ b/src/UI/ThemeViewGUI.svelte @@ -402,7 +402,7 @@
- +
{/if}