From a185d10e1c93af1fe8e14c73312e9c3e8f851456 Mon Sep 17 00:00:00 2001 From: Nate Emmert Date: Thu, 15 Oct 2026 15:52:59 -0400 Subject: [PATCH] Fix storm cards not flying to the storm: stop waiting on the one-shot map 'load' event Co-Authored-By: Claude Sonnet 5.5 --- app/public/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/public/app.js b/app/public/app.js index 1cc53e1..96fd2e5 100644 --- a/app/public/app.js +++ b/app/public/app.js @@ -174,7 +174,9 @@ async function flyToHurricane(storm) { const map = mapsOverview.map; if (!map) return; - if (!map.loaded()) await new Promise(resolve => map.once('load', resolve)); + // 'load' fires only once per map, so waiting on it hangs forever whenever tiles are mid-load; + // flyTo works regardless, so just make sure the canvas has its real size first. + map.resize(); map.flyTo({ center: [lon, lat], zoom: 4, duration: 900 });