forked from MapComplete/MapComplete
Disable feature box if the feature has changed upstream and no longer matches the layer definition
This commit is contained in:
parent
ac90379499
commit
cae8854dbe
2 changed files with 12 additions and 1 deletions
|
@ -17,6 +17,12 @@
|
|||
export let tags: UIEventSource<Record<string, string>> = state.featureProperties.getStore(
|
||||
selectedElement.properties.id
|
||||
)
|
||||
|
||||
|
||||
let stillMatches = tags.map(tags => {
|
||||
console.log("Tags are now:",tags, layer.source.osmTags?.matchesProperties(tags))
|
||||
return !layer.source?.osmTags || layer.source.osmTags?.matchesProperties(tags)
|
||||
})
|
||||
|
||||
let _metatags: Record<string, string>
|
||||
onDestroy(
|
||||
|
@ -35,7 +41,11 @@
|
|||
)
|
||||
</script>
|
||||
|
||||
{#if $tags._deleted === "yes"}
|
||||
{#if !$stillMatches}
|
||||
<div class="alert" aria-live="assertive">
|
||||
<Tr t={Translations.t.delete.isChanged}/>
|
||||
</div>
|
||||
{:else if $tags._deleted === "yes"}
|
||||
<div aria-live="assertive">
|
||||
<Tr t={Translations.t.delete.isDeleted} />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue