mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Fix dashboard satellite change timing issue
- Remove duplicate updateRealTimePositions() call from onSatelliteChange() since calculatePasses() already calls selectPass() which triggers it - Clear passes and selectedPass when changing satellites to prevent using stale data - Clear map layers when changing satellites 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -901,11 +901,20 @@
|
||||
document.getElementById('trackingStatus').textContent = 'ACQUIRING ' + satName;
|
||||
document.getElementById('trackingDot').style.background = 'var(--accent-orange)';
|
||||
|
||||
// Recalculate passes for new satellite
|
||||
calculatePasses();
|
||||
// Clear current pass selection while loading new data
|
||||
selectedPass = null;
|
||||
passes = [];
|
||||
|
||||
// Update real-time position immediately
|
||||
updateRealTimePositions();
|
||||
// Clear map layers from previous satellite
|
||||
if (groundMap) {
|
||||
if (trackLine) { groundMap.removeLayer(trackLine); trackLine = null; }
|
||||
if (satMarker) { groundMap.removeLayer(satMarker); satMarker = null; }
|
||||
if (orbitTrack) { groundMap.removeLayer(orbitTrack); orbitTrack = null; }
|
||||
}
|
||||
|
||||
// Recalculate passes for new satellite
|
||||
// calculatePasses() will call selectPass(0) which calls updateRealTimePositions()
|
||||
calculatePasses();
|
||||
}
|
||||
|
||||
// Initialize dashboard
|
||||
|
||||
Reference in New Issue
Block a user