mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
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:
parent
637ab67b93
commit
82ede035d6
2 changed files with 3 additions and 5 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue