Browse Source

UI: Fix map widget fit to bounds in draggable mode

pull/8203/head
Igor Kulikov 4 years ago
parent
commit
62affb04f9
  1. 2
      ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts

2
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;
}

Loading…
Cancel
Save