From 62affb04f912e95af2ba377b146b0864349f4011 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 8 Mar 2023 16:25:50 +0200 Subject: [PATCH] UI: Fix map widget fit to bounds in draggable mode --- .../app/modules/home/components/widget/lib/maps/leaflet-map.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts index e2dfff11ea..4f8fa9d6c7 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts @@ -841,7 +841,7 @@ export default abstract class LeafletMap { this.fitBounds(bounds); } } - if (this.options.initDragMode && !this.initDragModeIgnoreUpdateBoundsSet) { + if (this.options.initDragMode && !this.initDragModeIgnoreUpdateBoundsSet && bounds.isValid()) { this.initDragModeIgnoreUpdateBoundsSet = true; this.ignoreUpdateBounds = true; }