mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Drop the duplicate callout test and the card id cache
This commit is contained in:
1 parent
c9f40a837c
commit
4c62435910
5 files changed
+5
-72
No files matched your search
@@ -117,14 +117,6 @@ export function createCards({
|
||||
/** Stable overlay identity for MMSI-keyed and source-retained unkeyed rows. */
|
||||
|
||||
function vesselOverlayEntryId(record) {
|
||||
// Cached on the record: detection asks for it every frame for every vessel.
|
||||
if (record?.overlayEntryId) return record.overlayEntryId;
|
||||
const id = composeVesselOverlayEntryId(record);
|
||||
if (record) record.overlayEntryId = id;
|
||||
return id;
|
||||
}
|
||||
|
||||
function composeVesselOverlayEntryId(record) {
|
||||
const mmsi = String(record?.mmsi || '').trim();
|
||||
if (mmsi) return `vessel:${mmsi}`;
|
||||
const name = String(record?.name || 'VESSEL').trim() || 'VESSEL';
|
||||
|
||||
@@ -23,8 +23,6 @@ export function normalizeVessel(row) {
|
||||
lastPositionUtc: String(row.last_position_UTC || ''),
|
||||
lastPositionEpoch: finiteNumber(row.last_position_epoch),
|
||||
missedRefreshes: 0,
|
||||
// Cached by `vesselOverlayEntryId`; the fields it reads never change.
|
||||
overlayEntryId: null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user