From 1f0782665bb0b3aa40c3be7677423585edebcc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Thu, 9 May 2024 18:04:54 +0200 Subject: [PATCH] feat(sync): handle syncing of map limitbounds. --- umap/static/umap/js/umap.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 7a533967..8924a2f4 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -1445,6 +1445,14 @@ U.Map = L.Map.extend({ this.options.limitBounds.north = L.Util.formatNum(bounds.getNorth()) this.options.limitBounds.east = L.Util.formatNum(bounds.getEast()) boundsBuilder.fetchAll() + + const { subject, metadata, engine } = this.getSyncMetadata() + engine.update( + subject, + metadata, + 'options.limitBounds', + this.options.limitBounds + ) this.isDirty = true this.handleLimitBounds() },