mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Keep tracked-entity state in app records instead of on Cesium entities
Flights, military, satellites, installations, local ADS-B and ALPR hung gevTrackedId, gevDisplayPosition, gevVisualPosition, gevSelectionOrigin and gevLabelModel on the Cesium entities they draw, and the tracked readout, follow camera, cockpit, share links and awareness read them back. They now live in src/data/entityRecords.js, an app-owned record per entity: layers write entityRecord(entity), readers use readEntityRecord(entity). Nothing changes on screen. This is the first slice of the renderer plan's state mirror (P1). The module is exported as ./data/entity-records so callers can read the same records, and window.__godsEyeView.entityRecords gives the QA scripts the same access from the page.
This commit is contained in:
1 parent
ea69bb4ce2
commit
65587f6c08
53 files changed
+408
-291
No files matched your search
@@ -4,6 +4,7 @@ import { canPresentDeferredStatusNotice } from '../loadingFeedback.js';
|
||||
import { t, msg, formatDate } from '../i18n/index.js';
|
||||
import { SHARE_VIEW_ENTITY_KINDS } from '../share/follow.js';
|
||||
import { UiLifetime } from './uiLifetime.js';
|
||||
import { readEntityRecord } from '../data/entityRecords.js';
|
||||
|
||||
/** How long a shared vessel may take to appear in the vessel feed. */
|
||||
export const SHARED_VESSEL_WAIT_MS = 120_000;
|
||||
@@ -424,7 +425,7 @@ export class ShareRestoration {
|
||||
// a long link's follow keeps the app's own framing.
|
||||
if (
|
||||
!view?.lastKnown ||
|
||||
String(entity?.gevTrackedId || '') !==
|
||||
String(readEntityRecord(entity)?.trackedId || '') !==
|
||||
`${result.layerId}:${result.targetId}`
|
||||
)
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user