diff --git a/web/js/sections/board-control.js b/web/js/sections/board-control.js index 7d42ee4..9bd0a4c 100644 --- a/web/js/sections/board-control.js +++ b/web/js/sections/board-control.js @@ -93,18 +93,22 @@ function buildHTML() { display: flex; flex-direction: column; } + .fullscreen-card #map-wrapper { + align-items: center !important; + } .fullscreen-card #map-container { - max-width: none !important; - height: 100% !important; - display: flex; - align-items: center; - justify-content: center; + max-width: 100% !important; + width: min(100%, calc((100vh - 90px) * (var(--w) / var(--h)))) !important; + height: auto !important; + aspect-ratio: calc(var(--w) / var(--h)) !important; + display: block !important; } .fullscreen-card #bg-image { - max-height: 100%; - width: auto !important; - max-width: 100%; - object-fit: contain; + width: 100% !important; + height: 100% !important; + object-fit: fill !important; + max-width: none !important; + max-height: none !important; } @@ -129,7 +133,7 @@ function buildHTML() { -
+
@@ -328,7 +332,8 @@ function renderSpots() { const w = bounds.xMax - bounds.xMin; const h = bounds.yMax - bounds.yMin; - // mapContainer.style.aspectRatio = `${w}/${h}`; // Let natural image aspect ratio dictate container height + mapContainer.style.setProperty('--w', w); + mapContainer.style.setProperty('--h', h); listEl.innerHTML = ''; markersEl.innerHTML = '';