From 71859b21688a0638dbe76008d29b305d3ec4eed7 Mon Sep 17 00:00:00 2001 From: Louis King Date: Sat, 7 Feb 2026 21:01:29 +0000 Subject: [PATCH] Adjust map zoom levels for mobile devices - Mobile portrait (< 480px): padding [50, 50] for wider view - Mobile landscape (< 768px): padding [75, 75] - Desktop: padding [100, 100] Co-Authored-By: Claude Opus 4.5 --- src/meshcore_hub/web/templates/map.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/meshcore_hub/web/templates/map.html b/src/meshcore_hub/web/templates/map.html index 1c495d9..3371ec0 100644 --- a/src/meshcore_hub/web/templates/map.html +++ b/src/meshcore_hub/web/templates/map.html @@ -141,8 +141,9 @@ const MAX_BOUNDS_RADIUS_KM = 20; // Padding for fitBounds - more padding on mobile for tighter zoom + const isMobilePortrait = window.innerWidth < 480; const isMobile = window.innerWidth < 768; - const BOUNDS_PADDING = isMobile ? [150, 150] : [100, 100]; + const BOUNDS_PADDING = isMobilePortrait ? [50, 50] : (isMobile ? [75, 75] : [100, 100]); // Calculate distance between two points in km (Haversine formula) function getDistanceKm(lat1, lon1, lat2, lon2) {