diff --git a/src/static/css/style.css b/src/static/css/style.css index 03b3ecf..cb59058 100644 --- a/src/static/css/style.css +++ b/src/static/css/style.css @@ -4307,8 +4307,10 @@ select:focus-visible, textarea:focus-visible, } .map-container { flex: 1 1 0; + min-height: 0; position: relative; z-index: 1; + height: 100%; } /* Leaflet braucht eine absolute Hoehe - wir setzen sie per JS, aber als Fallback nutzen wir eine CSS-Regel */ diff --git a/src/static/js/components.js b/src/static/js/components.js index f6b2efe..cdc7c55 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -698,17 +698,14 @@ const UI = { if (statsEl) statsEl.textContent = `${locations.length} Orte / ${totalArticles} Artikel`; // Container-Hoehe sicherstellen (Leaflet braucht px-Hoehe) - if (container.offsetHeight < 50) { - // Fallback: Hoehe aus gridstack-Item berechnen - const gsItem = container.closest('.grid-stack-item'); - if (gsItem) { - const headerEl = container.closest('.map-card')?.querySelector('.card-header'); - const headerH = headerEl ? headerEl.offsetHeight : 40; - const available = gsItem.offsetHeight - headerH - 4; - container.style.height = Math.max(available, 200) + 'px'; - } else { - container.style.height = '300px'; - } + const gsItem = container.closest('.grid-stack-item'); + if (gsItem) { + const headerEl = container.closest('.map-card')?.querySelector('.card-header'); + const headerH = headerEl ? headerEl.offsetHeight : 40; + const available = gsItem.offsetHeight - headerH - 4; + container.style.height = Math.max(available, 200) + 'px'; + } else if (container.offsetHeight < 50) { + container.style.height = '300px'; } // Karte initialisieren oder updaten