mirror of
https://github.com/umap-project/umap.git
synced 2025-05-05 22:11:50 +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
0a1b2760de
commit
5c1c93f60e
2 changed files with 3 additions and 5 deletions
|
@ -122,6 +122,6 @@ export class FeatureUpdater extends BaseUpdater {
|
||||||
// XXX Distinguish between properties getting deleted
|
// XXX Distinguish between properties getting deleted
|
||||||
// and the wole feature getting deleted
|
// and the wole feature getting deleted
|
||||||
let feature = this.getFeatureFromMetadata(metadata)
|
let feature = this.getFeatureFromMetadata(metadata)
|
||||||
if (feature) feature.del()
|
if (feature) feature.del(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,16 +286,14 @@ U.FeatureMixin = {
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
|
del: function (sync) {
|
||||||
del: function (fromSync) {
|
|
||||||
this.isDirty = true
|
this.isDirty = true
|
||||||
this.map.closePopup()
|
this.map.closePopup()
|
||||||
if (this.datalayer) {
|
if (this.datalayer) {
|
||||||
this.datalayer.removeLayer(this)
|
this.datalayer.removeLayer(this)
|
||||||
this.disconnectFromDataLayer(this.datalayer)
|
this.disconnectFromDataLayer(this.datalayer)
|
||||||
|
|
||||||
// Do not relay the event if we received it.
|
if (sync !== false) this.syncDelete()
|
||||||
if (!fromSync) this.syncDelete()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue