Refactoring: don't show title icons if they are not known
This commit is contained in:
parent
6d8e5d4363
commit
c2b9a81c51
1 changed files with 8 additions and 4 deletions
|
@ -20,6 +20,7 @@
|
|||
onDestroy(tags.addCallbackAndRun(tags => {
|
||||
_tags = tags;
|
||||
}));
|
||||
console.log(layer.titleIcons.map(tr => tr.id));
|
||||
|
||||
let _metatags: Record<string, string>;
|
||||
onDestroy(state.userRelatedState.preferencesAsTags.addCallbackAndRun(tags => {
|
||||
|
@ -39,10 +40,13 @@
|
|||
</h3>
|
||||
|
||||
<div class="flex flex-row flex-wrap pt-0.5 sm:pt-1 items-center mr-2">
|
||||
{#each layer.titleIcons as titleIconConfig (titleIconConfig.id)}
|
||||
<div class="w-8 h-8">
|
||||
<TagRenderingAnswer config={titleIconConfig} {tags} {selectedElement} {state} {layer}></TagRenderingAnswer>
|
||||
</div>
|
||||
{#each layer.titleIcons as titleIconConfig}
|
||||
{#if titleIconConfig.IsKnown(_tags)}
|
||||
<div class="w-8 h-8">
|
||||
<TagRenderingAnswer config={titleIconConfig} {tags} {selectedElement} {state}
|
||||
{layer}></TagRenderingAnswer>
|
||||
</div>
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue