From a34062ce4ec90035ec1bd80df6afad99afacb08e Mon Sep 17 00:00:00 2001 From: James Smith Date: Tue, 30 Dec 2025 23:14:33 +0000 Subject: [PATCH] Fix Show Radar Display checkbox not working in Aircraft tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added toggleAircraftRadar() function and onchange handler to the checkbox. Also updated switchMode() to respect the checkbox state when switching to aircraft mode. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- templates/index.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index 5bc464f..1106a46 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3499,7 +3499,7 @@
@@ -4648,7 +4648,9 @@ document.getElementById('activeModeIndicator').innerHTML = '' + modeNames[mode]; document.getElementById('wifiVisuals').style.display = mode === 'wifi' ? 'grid' : 'none'; document.getElementById('btVisuals').style.display = mode === 'bluetooth' ? 'grid' : 'none'; - document.getElementById('aircraftVisuals').style.display = mode === 'aircraft' ? 'grid' : 'none'; + // Respect the "Show Radar Display" checkbox for aircraft mode + const showRadar = document.getElementById('adsbEnableMap').checked; + document.getElementById('aircraftVisuals').style.display = (mode === 'aircraft' && showRadar) ? 'grid' : 'none'; document.getElementById('satelliteVisuals').style.display = mode === 'satellite' ? 'block' : 'none'; // Update output panel title based on mode @@ -8250,6 +8252,14 @@ } } + function toggleAircraftRadar() { + const enabled = document.getElementById('adsbEnableMap').checked; + const visuals = document.getElementById('aircraftVisuals'); + if (visuals && currentMode === 'aircraft') { + visuals.style.display = enabled ? 'grid' : 'none'; + } + } + function applyAircraftFilter() { // Clear all markers and redraw with new filter Object.keys(aircraftMarkers).forEach(icao => {