From ad42c1aeaf545bfac391777226a08e1fd5949cdf Mon Sep 17 00:00:00 2001 From: Pablo Revilla Date: Tue, 2 Dec 2025 16:03:25 -0800 Subject: [PATCH] Update multi-language support. So far Spanish and english. --- meshview/templates/map.html | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/meshview/templates/map.html b/meshview/templates/map.html index 77ced31..6b2c817 100644 --- a/meshview/templates/map.html +++ b/meshview/templates/map.html @@ -135,6 +135,14 @@ const palette = ["#e6194b","#4363d8","#f58231","#911eb4","#46f0f0","#f032e6","#b const colorMap = new Map(); let nextColorIndex = 0; const channelSet = new Set(); +map.on("popupopen", function (e) { + const popupEl = e.popup.getElement(); + if (popupEl) { + applyTranslationsMap(popupEl); + } +}); + + function timeAgo(date){ const diff = Date.now() - new Date(date); const s = Math.floor(diff/1000), m = Math.floor(s/60), @@ -337,15 +345,13 @@ function renderNodesOnMap(){ } `; - marker.on("click", () => { + marker.on('click', () => { onNodeClick(node); marker.bindPopup(popup).openPopup(); - setTimeout(() => marker.closePopup(), 3000); }); - }); - // ❌ DO NOT auto-fit: - // map.fitBounds(bounds) + + }); // Still apply translations for popup content setTimeout(() => applyTranslationsMap(), 50);