forked from MapComplete/MapComplete
Fix: questions are shown if the condition is met, fix #1630
This commit is contained in:
parent
2d50323f21
commit
85002766a8
2 changed files with 3 additions and 14 deletions
|
@ -14,12 +14,6 @@
|
|||
export let tags: UIEventSource<Record<string, string>>
|
||||
export let highlightedRendering: UIEventSource<string> = undefined
|
||||
|
||||
let _tags: Record<string, string>
|
||||
onDestroy(
|
||||
tags.addCallbackAndRun((tags) => {
|
||||
_tags = tags
|
||||
})
|
||||
)
|
||||
|
||||
let _metatags: Record<string, string>
|
||||
onDestroy(
|
||||
|
@ -29,7 +23,7 @@
|
|||
)
|
||||
</script>
|
||||
|
||||
{#if _tags._deleted === "yes"}
|
||||
{#if $tags._deleted === "yes"}
|
||||
<Tr t={Translations.t.delete.isDeleted} />
|
||||
<button class="w-full" on:click={() => state.selectedElement.setData(undefined)}>
|
||||
<Tr t={Translations.t.general.returnToTheMap} />
|
||||
|
@ -37,8 +31,8 @@
|
|||
{:else}
|
||||
<div class="flex flex-col gap-y-2 overflow-y-auto p-1 px-2">
|
||||
{#each layer.tagRenderings as config (config.id)}
|
||||
{#if (config.condition === undefined || config.condition.matchesProperties(_tags)) && (config.metacondition === undefined || config.metacondition.matchesProperties( { ..._tags, ..._metatags } ))}
|
||||
{#if config.IsKnown(_tags)}
|
||||
{#if (config.condition?.matchesProperties($tags) ?? true) && (config.metacondition?.matchesProperties( { ...$tags, ..._metatags } ?? true))}
|
||||
{#if config.IsKnown($tags)}
|
||||
<TagRenderingEditable
|
||||
{tags}
|
||||
{config}
|
||||
|
|
|
@ -677,11 +677,6 @@ export default class SpecialVisualizations {
|
|||
)
|
||||
return new SvelteUIElement(StarsBarIcon, {
|
||||
score: reviews.average,
|
||||
reviews,
|
||||
state,
|
||||
tags,
|
||||
feature,
|
||||
layer,
|
||||
})
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue