mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Mark a resumed or share-restored follow only while it starts so a later follow of the same subject is navigation again
The aircraft scene binding re-tracked with origin share-restore, which stayed on the entity: a later trackedEntityChanged for it (cockpit exit, refocus) never stamped navigation, and the aircraft lost its selection origin. Flights, military and satellites now set a transient gevRestoring mark around follow.start, and the aircraft binding resumes with the origin the aircraft was selected by.
This commit is contained in:
1 parent
cbe1d841ea
commit
90d64e6916
7 files changed
+176
-41
No files matched your search
@@ -485,7 +485,16 @@ export function createTracking({
|
||||
layerState._contextRefreshedAtMs = Date.now();
|
||||
}
|
||||
|
||||
getRenderer().follow.start(layerState._trackedEntity);
|
||||
// Resumed or share-restored: not new navigation, only while the follow
|
||||
// starts (see flights/tracking.js).
|
||||
const entity = layerState._trackedEntity;
|
||||
const restoring = resuming || origin === 'share-restore';
|
||||
if (restoring) entity.gevRestoring = true;
|
||||
try {
|
||||
getRenderer().follow.start(entity);
|
||||
} finally {
|
||||
if (restoring) delete entity.gevRestoring;
|
||||
}
|
||||
console.log(`[Data:Satellites] Tracking ${name} (NORAD ${noradId})`);
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user