From d03a8babf0fc0327fe240d2ed34aeb4b48646a93 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Fri, 20 Mar 2026 22:47:14 +0100 Subject: [PATCH] fix(where): init Leaflet map on window load to fix size calculation on reload Leaflet reads offsetWidth/offsetHeight during init. When the inline IIFE ran during HTML parsing, the container's computed size wasn't final yet, causing fitBounds to position the map in a tiny corner. Wrapping in window.addEventListener('load') ensures full layout before map init. Co-Authored-By: Claude Sonnet 4.6 --- where.njk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/where.njk b/where.njk index 38aa6d3..f66bf96 100644 --- a/where.njk +++ b/where.njk @@ -38,7 +38,7 @@ leafletMap: true var checkinPoints = {{ mapPoints | dump | safe }}; {% endif %}