From 5fd65657c5e0990e6077454c07c4c5233d56004f Mon Sep 17 00:00:00 2001 From: Claude Dev Date: Sun, 15 Mar 2026 13:47:52 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20Karten-Container=20f=C3=BCllt=20jetzt=20?= =?UTF-8?q?die=20volle=20Kachel-H=C3=B6he=20aus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CSS: min-height:0 und height:100% für Flex-Container - JS: Höhe wird immer explizit aus der Gridstack-Kachel berechnet, nicht nur als Fallback unter 50px Co-Authored-By: Claude Opus 4.6 (1M context) --- src/static/css/style.css | 2 ++ src/static/js/components.js | 19 ++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) 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