mirror of
https://github.com/smittix/intercept.git
synced 2026-07-07 09:08:12 -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('trackingStatus').textContent = 'ACQUIRING ' + satName;
|
||||||
document.getElementById('trackingDot').style.background = 'var(--accent-orange)';
|
document.getElementById('trackingDot').style.background = 'var(--accent-orange)';
|
||||||
|
|
||||||
// Recalculate passes for new satellite
|
// Clear current pass selection while loading new data
|
||||||
calculatePasses();
|
selectedPass = null;
|
||||||
|
passes = [];
|
||||||
|
|
||||||
// Update real-time position immediately
|
// Clear map layers from previous satellite
|
||||||
updateRealTimePositions();
|
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
|
// Initialize dashboard
|
||||||
|
|||||||
Reference in New Issue
Block a user