fix(cockpit): a catalog refresh in orbit keeps the subject and its companions hidden, and releasing the ISS leaves its ring to its class

This commit is contained in:
Sameh Khamis committed 2026-11-08 15:55:02 -08:00
1 parent d0ef5250ac
commit a5df391d6c
2 files changed
+55 -5

No files matched your search

+10 -2
View File
@@ -199,16 +199,24 @@ export function createCockpitSubject({ state: layerState, parts }) {
// The tracked primitive stays hidden: its entity draws the dot.
if (noradId !== tracked) _setPointShown(noradId, true);
}
// Re-applied every sync: a catalog rebuild replaces the point
// primitives, and the new ones arrive shown.
for (const noradId of companions) {
if (noradId === tracked || hiddenPoints.has(noradId)) continue;
if (noradId === tracked) continue;
hiddenPoints.add(noradId);
_setPointShown(noradId, false);
}
if (held) {
const trackedPoint = layerState._points.get(tracked);
if (trackedPoint) trackedPoint.show = false;
}
const hiddenPath = layerState._cockpitHiddenPath;
if (hiddenPath !== null && (!held || hiddenPath !== tracked)) {
const path = layerState._orbitPaths.get(hiddenPath);
if (path)
// The ISS's ring also follows its class (and its tracking).
if (path && hiddenPath === ISS_NORAD) parts.controls._syncIssOrbit();
else if (path)
path.primitive.show = parts.controls.satelliteVisualsVisible(
layerState._enabled,
layerState._params.showOrbits,