From fa7417d33e7a4b5ffd7a391d179aa8da0ed3237b Mon Sep 17 00:00:00 2001 From: pe1hvh Date: Thu, 12 Mar 2026 06:02:31 +0100 Subject: [PATCH] HotFix --- CHANGELOG.md | 3 ++- meshcore_gui/static/leaflet_map_panel.js | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c8d339..1b253b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,8 @@ Format follows [Keep a Changelog](https://keepachangelog.com/) and [Semantic Ver ### Changed - 🔄 `meshcore_gui/static/leaflet_map_panel.js` — Added size guard in `ensureMap`: returns `null` when host has `clientWidth === 0 && clientHeight === 0` and no map - state exists yet. `processPending` retries on the next tick once the panel is visible. + state exists yet. `processPending` now explicitly reschedules itself until the panel + becomes visible, instead of silently returning and leaving the map pending forever. - 🔄 `meshcore_gui/gui/dashboard.py` — Consolidated two conditional map-update blocks into a single unconditional update while the MAP panel is active. Added `h-96` to the DOMCA CSS height overrides for consistency with the route page map container. diff --git a/meshcore_gui/static/leaflet_map_panel.js b/meshcore_gui/static/leaflet_map_panel.js index 63c5979..ebecd27 100644 --- a/meshcore_gui/static/leaflet_map_panel.js +++ b/meshcore_gui/static/leaflet_map_panel.js @@ -470,6 +470,13 @@ try { const state = PANEL.ensureMap(containerId); if (!state) { + if (retries >= MAX_RETRIES) { + console.error('MeshCoreLeafletBoot timeout waiting for visible map host', { containerId }); + return; + } + window.setTimeout(() => { + scheduleProcess(containerId, retries + 1); + }, RETRY_DELAY_MS); return; } const current = pending.get(containerId);