forked from MapComplete/MapComplete
Don't show irrelevant title icons
This commit is contained in:
parent
e0527e9647
commit
55e12c32e5
3 changed files with 5 additions and 4 deletions
|
@ -251,6 +251,7 @@ export default class UserRelatedState {
|
|||
_theme: layout?.id,
|
||||
_backend: this.osmConnection.Backend(),
|
||||
_applicationOpened: new Date().toISOString(),
|
||||
_supports_sharing: window.navigator.share ? "yes" : "no"
|
||||
})
|
||||
|
||||
const osmConnection = this.osmConnection
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
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 => {
|
||||
|
@ -41,7 +40,7 @@
|
|||
|
||||
<div class="flex flex-row flex-wrap pt-0.5 sm:pt-1 items-center mr-2">
|
||||
{#each layer.titleIcons as titleIconConfig}
|
||||
{#if titleIconConfig.IsKnown(_tags)}
|
||||
{#if ( titleIconConfig.condition?.matchesProperties(_tags) ?? true) && (titleIconConfig.metacondition?.matchesProperties(_tags) ?? true) && titleIconConfig.IsKnown(_tags)}
|
||||
<div class="w-8 h-8">
|
||||
<TagRenderingAnswer config={titleIconConfig} {tags} {selectedElement} {state}
|
||||
{layer}></TagRenderingAnswer>
|
||||
|
|
|
@ -100,7 +100,8 @@
|
|||
"labels": [
|
||||
"defaults"
|
||||
],
|
||||
"render": "{share_link()}"
|
||||
"render": "{share_link()}",
|
||||
"metacondition": "_supports_sharing=yes"
|
||||
},
|
||||
{
|
||||
"id": "osmlink",
|
||||
|
@ -123,4 +124,4 @@
|
|||
}
|
||||
],
|
||||
"mapRendering": null
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue