mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Name the real gate altitude and repaint coverage rows at once
The Transit prompt said "Fly below 3,000 km", but the closed gate opens at 2,850 km; it now names the enter threshold, as Bike Share does. When the camera changes coverage, Transit and Bike Share ask the Layers panel to repaint instead of leaving the old prompt up until the next 15 s / 60 s tick.
This commit is contained in:
1 parent
25c33893f6
commit
90db4eb2c9
13 files changed
+233
-7
No files matched your search
@@ -83,7 +83,9 @@ export function createViewport({ state, services, parts }) {
|
||||
if (!state._enabled || !state._viewer) return;
|
||||
refreshViewBounds();
|
||||
const altitude = getCameraAltitude();
|
||||
const wasGateOpen = state._altitudeGateOpen;
|
||||
state._altitudeGateOpen = altitudeGateOpen(altitude);
|
||||
let changed = state._altitudeGateOpen !== wasGateOpen;
|
||||
const center = state._altitudeGateOpen ? getCameraCenterLatLon() : null;
|
||||
const desired = new Map();
|
||||
if (center) {
|
||||
@@ -106,6 +108,7 @@ export function createViewport({ state, services, parts }) {
|
||||
state._activeFeeds.delete(feedId);
|
||||
state._feedStatus.delete(feedId);
|
||||
parts.ingestion.removeFeedVehicles(feedId);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
// Leaving coverage leaves nothing on the map to date: a row that read
|
||||
@@ -115,11 +118,15 @@ export function createViewport({ state, services, parts }) {
|
||||
if (!state._activeFeeds.has(feedId)) {
|
||||
state._activeFeeds.set(feedId, feed);
|
||||
void parts.ingestion.pollFeed(feed, state._generation);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
parts.ingestion.sweepAgedVehicles(Date.now());
|
||||
parts.rendering.syncRenderHold();
|
||||
governorRequestRender('transit-proximity');
|
||||
// The row's text follows the camera (coverage prompt, feed list), so it
|
||||
// repaints now instead of at the next 15 s manager tick.
|
||||
if (changed) state._dataManager?.refreshLayerStats?.();
|
||||
}
|
||||
|
||||
function onCameraChanged() {
|
||||
|
||||
Reference in new issue
Block a user