From 0dbac92853b1816d55c9a23ab21a85ef7fc28db5 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 12 Nov 2024 14:50:08 +0100 Subject: [PATCH] chore: remove 'postsync' event --- umap/static/umap/js/modules/importer.js | 1 - umap/static/umap/js/modules/permissions.js | 1 - umap/static/umap/js/modules/umap.js | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/umap/static/umap/js/modules/importer.js b/umap/static/umap/js/modules/importer.js index df41b4f4..515c9a17 100644 --- a/umap/static/umap/js/modules/importer.js +++ b/umap/static/umap/js/modules/importer.js @@ -251,7 +251,6 @@ export default class Importer { } full() { - this.umap._leafletMap.once('postsync', this.umap._leafletMap._setDefaultCenter) try { if (this.files.length) { for (const file of this.files) { diff --git a/umap/static/umap/js/modules/permissions.js b/umap/static/umap/js/modules/permissions.js index ebf586ee..d636836d 100644 --- a/umap/static/umap/js/modules/permissions.js +++ b/umap/static/umap/js/modules/permissions.js @@ -193,7 +193,6 @@ export class MapPermissions extends ServerStored { ) if (!error) { this.commit() - this.umap._leafletMap.fire('postsync') return true } } diff --git a/umap/static/umap/js/modules/umap.js b/umap/static/umap/js/modules/umap.js index 03c4dc2a..b104d97b 100644 --- a/umap/static/umap/js/modules/umap.js +++ b/umap/static/umap/js/modules/umap.js @@ -1504,7 +1504,7 @@ export default class Umap extends ServerStored { datalayer.redraw() }) this.propagate() - this._leafletMap.fire('postsync') + this._leafletMap._setDefaultCenter() this.isDirty = true }