mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Fix Show Radar Display checkbox not working in Aircraft tab
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 <noreply@anthropic.com>
This commit is contained in:
@@ -3499,7 +3499,7 @@
|
||||
</div>
|
||||
<div class="checkbox-group">
|
||||
<label>
|
||||
<input type="checkbox" id="adsbEnableMap" checked>
|
||||
<input type="checkbox" id="adsbEnableMap" checked onchange="toggleAircraftRadar()">
|
||||
Show Radar Display
|
||||
</label>
|
||||
</div>
|
||||
@@ -4648,7 +4648,9 @@
|
||||
document.getElementById('activeModeIndicator').innerHTML = '<span class="pulse-dot"></span>' + 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 => {
|
||||
|
||||
Reference in New Issue
Block a user