diff --git a/umap/static/umap/js/modules/sync/updaters.js b/umap/static/umap/js/modules/sync/updaters.js index d7a45492..29c1c995 100644 --- a/umap/static/umap/js/modules/sync/updaters.js +++ b/umap/static/umap/js/modules/sync/updaters.js @@ -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) } } diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index e171daf8..fbe0af5c 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -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() } },