diff --git a/src/static/css/style.css b/src/static/css/style.css index 715cccc..9148535 100644 --- a/src/static/css/style.css +++ b/src/static/css/style.css @@ -4145,9 +4145,11 @@ a:hover { /* === Karten-Kachel (Leaflet) === */ .map-card { + position: absolute; + inset: 0; display: flex; flex-direction: column; - height: 100%; + overflow: hidden; } .map-card .card-header { flex-shrink: 0; @@ -4159,16 +4161,16 @@ a:hover { } .map-container { flex: 1; - min-height: 200px; position: relative; z-index: 1; + min-height: 0; } .map-empty { display: flex; align-items: center; justify-content: center; - height: 100%; - min-height: 200px; + position: absolute; + inset: 0; color: var(--text-tertiary); font-size: 13px; font-family: var(--font-body); diff --git a/src/static/dashboard.html b/src/static/dashboard.html index 07b8100..3b34af4 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -16,7 +16,7 @@ - + @@ -560,10 +560,10 @@ - - - - - + + + + + diff --git a/src/static/js/components.js b/src/static/js/components.js index 8127516..6445fff 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -707,8 +707,19 @@ const UI = { } } - // Resize-Fix fuer gridstack - setTimeout(() => { if (this._map) this._map.invalidateSize(); }, 200); + // Resize-Fix fuer gridstack (mehrere Versuche, da Container-Hoehe erst spaeter steht) + const self = this; + [100, 300, 800].forEach(delay => { + setTimeout(() => { + if (!self._map) return; + self._map.invalidateSize(); + if (bounds.length === 1) { + self._map.setView(bounds[0], 8); + } else if (bounds.length > 1) { + self._map.fitBounds(bounds, { padding: [30, 30], maxZoom: 12 }); + } + }, delay); + }); }, _applyMapTiles() {