From b2a5f066461914b2cc66b3454e8a20e41b05e7eb Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 21 Jan 2025 15:39:20 +0200 Subject: [PATCH] feat(geomap): enable autopan for dragging markers --- src/public/app/widgets/type_widgets/geo_map.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/type_widgets/geo_map.ts b/src/public/app/widgets/type_widgets/geo_map.ts index 77ccfd049..ed61f0a2c 100644 --- a/src/public/app/widgets/type_widgets/geo_map.ts +++ b/src/public/app/widgets/type_widgets/geo_map.ts @@ -128,7 +128,9 @@ export default class GeoMapTypeWidget extends TypeWidget { const [ lat, lng ] = latLng.split(",", 2).map((el) => parseFloat(el)); const marker = L.marker(L.latLng(lat, lng), { - draggable: true + draggable: true, + autoPan: true, + autoPanSpeed: 5 }) .addTo(map) .bindPopup(childNote.title)