diff --git a/package.json b/package.json index 17b51bcfd..98d8a9e59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.34.4", + "version": "0.34.6", "repository": "https://github.com/pietervdvn/MapComplete", "description": "A small website to edit OSM easily", "bugs": "https://github.com/pietervdvn/MapComplete/issues", diff --git a/src/UI/BigComponents/SelectedElementView.svelte b/src/UI/BigComponents/SelectedElementView.svelte index afa7b7d87..2d4d7103d 100644 --- a/src/UI/BigComponents/SelectedElementView.svelte +++ b/src/UI/BigComponents/SelectedElementView.svelte @@ -25,6 +25,11 @@ let knownTagRenderings = layer.tagRenderings .filter(config => (config.condition?.matchesProperties($tags) ?? true) && (config.metacondition?.matchesProperties({ ...$tags, ..._metatags } ?? true) && config.IsKnown($tags))) + $: { + knownTagRenderings = layer.tagRenderings + .filter(config => (config.condition?.matchesProperties($tags) ?? true) && (config.metacondition?.matchesProperties({ ...$tags, ..._metatags } ?? true) + && config.IsKnown($tags))) + } {#if $tags._deleted === "yes"} diff --git a/src/UI/Popup/TagRendering/Questionbox.svelte b/src/UI/Popup/TagRendering/Questionbox.svelte index d063cd1ba..71478b75d 100644 --- a/src/UI/Popup/TagRendering/Questionbox.svelte +++ b/src/UI/Popup/TagRendering/Questionbox.svelte @@ -3,17 +3,16 @@ * Shows all questions for which the answers are unknown. * The questions can either be shown all at once or one at a time (in which case they can be skipped) */ - import TagRenderingConfig from "../../../Models/ThemeConfig/TagRenderingConfig" - import { UIEventSource } from "../../../Logic/UIEventSource" - import type { Feature } from "geojson" - import type { SpecialVisualizationState } from "../../SpecialVisualization" - import LayerConfig from "../../../Models/ThemeConfig/LayerConfig" - import If from "../../Base/If.svelte" - import { onDestroy } from "svelte" - import TagRenderingQuestion from "./TagRenderingQuestion.svelte" - import Tr from "../../Base/Tr.svelte" - import Translations from "../../i18n/Translations.js" - import { Utils } from "../../../Utils" + import TagRenderingConfig from "../../../Models/ThemeConfig/TagRenderingConfig"; + import { UIEventSource } from "../../../Logic/UIEventSource"; + import type { Feature } from "geojson"; + import type { SpecialVisualizationState } from "../../SpecialVisualization"; + import LayerConfig from "../../../Models/ThemeConfig/LayerConfig"; + import If from "../../Base/If.svelte"; + import TagRenderingQuestion from "./TagRenderingQuestion.svelte"; + import Tr from "../../Base/Tr.svelte"; + import Translations from "../../i18n/Translations.js"; + import { Utils } from "../../../Utils"; export let layer: LayerConfig export let tags: UIEventSource> @@ -69,15 +68,6 @@ [skippedQuestions] ) - let _questionsToAsk: TagRenderingConfig[] - let _firstQuestion: TagRenderingConfig - onDestroy( - questionsToAsk.subscribe((qta) => { - _questionsToAsk = qta - _firstQuestion = qta[0] - }) - ) - let answered: number = 0 let skipped: number = 0 @@ -98,9 +88,9 @@
- {#if _questionsToAsk.length === 0} + {#if $questionsToAsk.length === 0} {#if skipped + answered > 0}
@@ -148,26 +138,26 @@
- {#each _questionsToAsk as question (question.id)} + {#each $questionsToAsk as question (question.id)} {/each}
{ - skip(_firstQuestion, true) + skip($questionsToAsk[0], true) }} >