Skip to content

Commit 6a34855

Browse files
committed
🐛 Fix: height/width issues on small screens
1 parent 6f4d891 commit 6a34855

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

assets/js/leaflet.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
const mapWidth = script?.getAttribute("data-map-width");
2525

2626
const mapElement = document.getElementById(mapId);
27+
mapElement.style.maxHeight = "100vh";
2728
mapElement.style.height = mapHeight;
29+
mapElement.style.maxWidth = "100vw";
2830
mapElement.style.width = mapWidth;
2931

3032
const map = L.map(mapId).setView([mapCenterX, mapCenterY], defaultZoom);

0 commit comments

Comments
 (0)