@regionerne/gis-komponent 0.0.71 → 0.0.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -471,7 +471,13 @@ class LayoutService {
471
471
  let dragPosition = { x: x, y: y };
472
472
  if (!this._map)
473
473
  return dragPosition;
474
- const containerRect = this._map.getViewport().getBoundingClientRect();
474
+ let containerRect = this._map.getViewport().getBoundingClientRect();
475
+ if (containerRect.height === 0) {
476
+ // Wait for map to load fully
477
+ const timeout = setTimeout(() => {
478
+ containerRect = this._map.getViewport().getBoundingClientRect();
479
+ }, 500);
480
+ }
475
481
  if (currentPosition) {
476
482
  // Expanding a widget or viewport changed size, so fit the widget inside view again
477
483
  x = currentPosition.x;