mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
fix(cockpit): application subjects follow a change of language, never stand on the ellipsoid, and are guarded on every call; a re-selected subject takes entry again
- Labels, entry face and look may be functions, read again on every use and on a locale change; a failing read keeps the last good value. - A frame with no height keeps the eye's last height, or waits (surfaceAcquiring) until the floor is known; heights outside -1,000..50,000 m read as null. - Provider methods are synchronous: a returned promise is refused like a throw, and a hold that fails is released. - A candidate may carry selectedAt; Rail and Transit stamp selectedAtMs on every selection, so re-selecting moves a subject to the front. - A released Transit vehicle leaves the visible set at once. - docs/CURRENT-STATE.md states the new entry order; docs/APPLICATION.md documents cockpit subjects, ./i18n/locale and ./layers/rail/paths.
This commit is contained in:
1 parent
01a74fceec
commit
57d87d2bbf
18 files changed
+707
-199
No files matched your search
@@ -994,7 +994,7 @@ test('a place that lands after the exit is dropped', async (t) => {
|
||||
assert.equal(store.orbital, null, 'no HUD comes back for a stale answer');
|
||||
});
|
||||
|
||||
test('a tracked aircraft takes entry before a tracked satellite', async (t) => {
|
||||
test('an aircraft and a satellite first seen in one sync: the aircraft takes entry, by the fixed order', async (t) => {
|
||||
const aircraftInfo = {
|
||||
icao24: 'abc123',
|
||||
callsign: 'TEST1',
|
||||
@@ -1007,6 +1007,9 @@ test('a tracked aircraft takes entry before a tracked satellite', async (t) => {
|
||||
};
|
||||
const { cockpit, viewer, aircraft, store } = fixture(t, { aircraftInfo });
|
||||
viewer.trackedEntity = aircraft;
|
||||
// The satellite and the aircraft are both new to this sync; the fixed order
|
||||
// decides between subjects first seen together. Selected one after the
|
||||
// other, the later one takes entry (cockpitEntryGate.test.mjs).
|
||||
cockpit.syncEntry();
|
||||
assert.equal(store.presence.entryKind, 'aircraft');
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user