chore(sync): use sync=false everywhere to stop propagation

In some cases, you want to stop the propagation of events. The previous
code was using `fromSync=true` and `sync=false` interchangeably. This
makes it use `sync=false` everywhere.
This commit is contained in:
Alexis Métaireau 2024-05-15 18:54:56 +02:00
parent 637ab67b93
commit 82ede035d6
2 changed files with 3 additions and 5 deletions

View file

@ -122,6 +122,6 @@ export class FeatureUpdater extends BaseUpdater {
// XXX Distinguish between properties getting deleted
// and the wole feature getting deleted
let feature = this.getFeatureFromMetadata(metadata)
if (feature) feature.del()
if (feature) feature.del(false)
}
}

View file

@ -286,16 +286,14 @@ U.FeatureMixin = {
}
return false
},
del: function (fromSync) {
del: function (sync) {
this.isDirty = true
this.map.closePopup()
if (this.datalayer) {
this.datalayer.removeLayer(this)
this.disconnectFromDataLayer(this.datalayer)
// Do not relay the event if we received it.
if (!fromSync) this.syncDelete()
if (sync !== false) this.syncDelete()
}
},