mirror of
https://github.com/smittix/intercept.git
synced 2026-05-03 02:50:01 -07:00
Fix mobile responsiveness and map loading issues
- Add comprehensive mobile CSS for viewport scrolling and layout stacking - Fix Leaflet maps not rendering by adding explicit heights and invalidateSize() calls - Add touch-friendly controls and proper touch-action for maps - Simplify header on mobile, hide stats and reduce sizes - Handle orientation changes and window resize for maps Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2084,16 +2084,38 @@
|
||||
} else if (mode === 'aircraft') {
|
||||
checkAdsbTools();
|
||||
initAircraftRadar();
|
||||
// Fix map sizing on mobile after container becomes visible
|
||||
setTimeout(() => {
|
||||
if (aircraftMap) aircraftMap.invalidateSize();
|
||||
}, 100);
|
||||
} else if (mode === 'aprs') {
|
||||
checkAprsTools();
|
||||
initAprsMap();
|
||||
refreshAprsDevices();
|
||||
// Fix map sizing on mobile after container becomes visible
|
||||
setTimeout(() => {
|
||||
if (aprsMap) aprsMap.invalidateSize();
|
||||
}, 100);
|
||||
} else if (mode === 'satellite') {
|
||||
initPolarPlot();
|
||||
initSatelliteList();
|
||||
}
|
||||
}
|
||||
|
||||
// Handle window resize for maps (especially important on mobile orientation change)
|
||||
window.addEventListener('resize', function() {
|
||||
if (aircraftMap) aircraftMap.invalidateSize();
|
||||
if (aprsMap) aprsMap.invalidateSize();
|
||||
});
|
||||
|
||||
// Also handle orientation changes explicitly for mobile
|
||||
window.addEventListener('orientationchange', function() {
|
||||
setTimeout(() => {
|
||||
if (aircraftMap) aircraftMap.invalidateSize();
|
||||
if (aprsMap) aprsMap.invalidateSize();
|
||||
}, 200);
|
||||
});
|
||||
|
||||
// Track unique sensor devices
|
||||
let uniqueDevices = new Set();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user