From 4ed005fb3757e80d358844ad1569439183710155 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 28 Apr 2026 20:37:38 +0000 Subject: [PATCH] Move map as bounds change on communication workspace --- ts/map/Map.vue | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ts/map/Map.vue b/ts/map/Map.vue index 7e282363..371775e0 100644 --- a/ts/map/Map.vue +++ b/ts/map/Map.vue @@ -245,6 +245,28 @@ onBeforeUnmount(() => { map.value.remove(); } }); +watch( + () => props.bounds, + (newBounds) => { + if (!map.value) return; + if (map.value.loaded()) { + map.value.fitBounds( + newBounds, + { padding: 50, duration: 1000 }, + { isInternalUpdate: true }, + ); + } else { + map.value.once("load", () => { + if (!map.value) return; + map.value.fitBounds( + newBounds, + { padding: 50, duration: 0 }, + { isInternalUpdate: true }, + ); + }); + } + }, +); watch( () => props.cursor, (newCursor) => {