From 46207741ff6267c45374ccb3b29d470e2092694c 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 77ec2d05..18212ce9 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -1448,6 +1448,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() },