Skip to content

High performance self-hosted photo and video management solution.

fix: panning interrupted while moving around the map (#19276)

Daniel Dietzler07aa51638c2b
diff --git a/web/src/lib/components/shared-components/map/map.svelte b/web/src/lib/components/shared-components/map/map.svelte
index af9604b680..a7bb5cbdf9 100644
--- a/web/src/lib/components/shared-components/map/map.svelte
+++ b/web/src/lib/components/shared-components/map/map.svelte
@@ -22,7 +22,7 @@
import { isEqual, omit } from 'lodash-es';
import { DateTime, Duration } from 'luxon';
import maplibregl, { GlobeControl, type GeoJSONSource, type LngLatLike } from 'maplibre-gl';
- import { onDestroy, onMount } from 'svelte';
+ import { onDestroy, onMount, untrack } from 'svelte';
import { t } from 'svelte-i18n';
import {
AttributionControl,
@@ -251,7 +251,11 @@
});
$effect(() => {
- map?.jumpTo({ center, zoom });
+ if (!center || !zoom) {
+ return;
+ }
+
+ untrack(() => map?.jumpTo({ center, zoom }));
});
</script>