mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Separate scene handoff and attachment from the page shell
Move the page handoff sequence into SceneSwitcher and include restoration in the application's candidate attachment. Release a failed candidate once before the request coordinator recovers the working engine. Keep address ordering, parked renderers, retained layers and cockpit resumption intact. Define the layer session and its field owners. Share its retention decision across teardown paths. Separate layer scene binding from lifecycle policy, and shell scene composition from page controls. Keep failed renderer releases in the binding owner, with the existing retry behavior. Give Director the scene and use the engine host for its canvas and pack container. Keep the existing tracked-subject interaction guard so neither engine's behavior changes. Pass startup chrome the first backend's explicit welcome policy instead of testing for a viewer. Cesium remains the behavior reference; this restructuring intentionally changes no visible behavior on either engine. Viewer references outside the Cesium engine fall from 948 to 933. All other coupling counts stay unchanged. Scene service ownership, raw debug access, and the remaining shell and host queues still need consolidation. Checked in the browser, keyless, on the dev server: the engine switch, Director engine switch, layer panel and layer visibility on both engines pass, and 14 of 15 strict scenarios pass (rapid, hidden-tab, context-loss, parked-release, Navara HD, failure matrix and soak among them). app-once and the Director next-shot step fail the same way before this change.
This commit is contained in:
1 parent
f385986383
commit
656943641c
23 files changed
+1265
-888
No files matched your search
+5
-458
@@ -1,23 +1,15 @@
|
||||
import { retainsLayerSession } from '../app/layerSession.js';
|
||||
import { nextTick } from 'vue';
|
||||
import { resolveImageryHost } from '../layers/weather/imageryHost.js';
|
||||
import { ShellFacade } from './shellFacade.js';
|
||||
import { ShellScene } from './shellScene.js';
|
||||
import { AircraftDisplay } from './aircraftDisplay.js';
|
||||
import { LayerBindings } from './layerBindings.js';
|
||||
import { PanelChrome } from './panelChrome.js';
|
||||
import { initMobileShell } from './mobileShell.js';
|
||||
import { VisualSettings } from './visualSettings.js';
|
||||
import { NavigationController } from './navigationController.js';
|
||||
import { ShareRestoration } from './shareRestoration.js';
|
||||
import { DisplayBindings } from './displayBindings.js';
|
||||
import {
|
||||
applyPendingVisualChoices,
|
||||
pendingVisualSettings,
|
||||
} from './pendingVisualSettings.js';
|
||||
import { createStateChannel } from '../app/stateChannel.js';
|
||||
import { UiLifetime } from './uiLifetime.js';
|
||||
import { RecordingControls } from './recordingControls.js';
|
||||
import { readShellElements } from './shellElements.js';
|
||||
import { CockpitCoordinator } from './cockpitCoordinator.js';
|
||||
import { ContextControls } from './context.js';
|
||||
import { CctvControls } from './cctv.js';
|
||||
import { StreetLevelControls } from './streetLevelControls.js';
|
||||
@@ -40,10 +32,7 @@ import { cesiumHeading, cesiumRoll } from '../cameraAngles.js';
|
||||
import { aircraftTrackingTarget } from '../cockpitTracking.js';
|
||||
|
||||
import { ShellFeedback } from './shellFeedback.js';
|
||||
import {
|
||||
applyShareFollowOffset,
|
||||
readShareFollowSubject,
|
||||
} from './shareFollow.js';
|
||||
import { readShareFollowSubject } from './shareFollow.js';
|
||||
|
||||
import { runCctvLayerEnableTransition } from '../cctvFocusPolicy.js';
|
||||
|
||||
@@ -59,7 +48,6 @@ import { PanelNavigation } from './panelNavigation.js';
|
||||
import { applicationPinia, createUiRuntime } from './vueRuntime.js';
|
||||
import { useContextStore } from './stores/context.js';
|
||||
import { useMissionReplayStore } from './stores/missionReplay.js';
|
||||
import { useCelestialRingStore } from './stores/celestialRing.js';
|
||||
import { useWorldOverlayActionsStore } from './stores/worldOverlayActions.js';
|
||||
import { useAwarenessDirectionStore } from './stores/awarenessDirection.js';
|
||||
import { useHudStore } from './stores/hud.js';
|
||||
@@ -89,7 +77,7 @@ import { useRecordingStore } from './stores/recording.js';
|
||||
* - Intel HUD lifecycle and variant switching.
|
||||
*/
|
||||
|
||||
export class StyleManager extends ShellFacade {
|
||||
export class StyleManager extends ShellScene {
|
||||
/**
|
||||
* @param {Cesium.Viewer} viewer - The CesiumJS viewer instance.
|
||||
* @param {object} [options] `engine`: the page's globe engine (the world
|
||||
@@ -438,445 +426,6 @@ export class StyleManager extends ShellFacade {
|
||||
this._layerBindings.observeCamera();
|
||||
}
|
||||
|
||||
// ── Scene attachment ──────────────────────────────────────────────────
|
||||
// The shell lives for the page; an engine switch only rebuilds the parts
|
||||
// bound to one globe (share restoration, visual effects, layer bindings,
|
||||
// Cockpit, the celestial ring, the overlay host, detection, the map-source
|
||||
// and camera-orientation controls) and points the kept ones (navigation,
|
||||
// location search, HUD, share link, display bindings) at the next globe.
|
||||
|
||||
/** Share restoration, visual settings and layer bindings of this globe. */
|
||||
_buildSceneControls() {
|
||||
const { viewer, engine, mapStackController } = this._scene;
|
||||
const services = this.services;
|
||||
const layerSession = this._layerSession;
|
||||
this._shareRestoration = new ShareRestoration({
|
||||
engine,
|
||||
canvas: engine?.host.canvas ?? viewer?.canvas,
|
||||
handoffLayers: layerSession?.handoffLayers,
|
||||
navigation: this._navigation,
|
||||
syncShareState: () => this._syncShareState(),
|
||||
syncModels3d: (state) => this._syncModels3dFromLayerState(state),
|
||||
showStatus: (message, options) =>
|
||||
this._showGlobalStatusNotice(message, options),
|
||||
feedback: this._feedback,
|
||||
updateFeedback: () => this._updateGlobalLoadingFeedback(),
|
||||
applyFollowOffset: (handle, offset) =>
|
||||
applyShareFollowOffset(engine, handle, offset),
|
||||
});
|
||||
|
||||
this._visualSettings = new VisualSettings({
|
||||
viewer,
|
||||
engine,
|
||||
mapStackController,
|
||||
services: {
|
||||
setScopeTerminusOverride: services.setScopeTerminusOverride,
|
||||
clampScopeTerminusPct: services.clampScopeTerminusPct,
|
||||
getDetectionMode: services.getDetectionMode,
|
||||
getDetectionTuning: services.getDetectionTuning,
|
||||
getKeyholeFadeTuning: services.getKeyholeFadeTuning,
|
||||
getScopeMaskFeather: services.getScopeMaskFeather,
|
||||
getScopeTerminusOverride: services.getScopeTerminusOverride,
|
||||
governorRequestRender: services.governorRequestRender,
|
||||
holdContinuousRender: services.holdContinuousRender,
|
||||
isCelestialRingStyleSupported: services.isCelestialRingStyleSupported,
|
||||
isScopeMaskEnabled: services.isScopeMaskEnabled,
|
||||
readDetectionDiagnostics: services.readDetectionDiagnostics,
|
||||
releaseContinuousRender: services.releaseContinuousRender,
|
||||
setDetectionModeByLabel: services.setDetectionModeByLabel,
|
||||
setDetectionStyle: services.setDetectionStyle,
|
||||
setDetectionTuning: services.setDetectionTuning,
|
||||
setKeyholeFadeTuning: services.setKeyholeFadeTuning,
|
||||
setScopeMaskEnabled: services.setScopeMaskEnabled,
|
||||
setScopeMaskFeather: services.setScopeMaskFeather,
|
||||
},
|
||||
elements: {
|
||||
_ppToggles: this._ppToggles,
|
||||
_sliderPanel: this._sliderPanel,
|
||||
},
|
||||
operations: {
|
||||
_restorePanelState: (...args) => this._restorePanelState(...args),
|
||||
_layoutRightPanels: (...args) => this._layoutRightPanels(...args),
|
||||
_scheduleAdaptivePanelLayout: (...args) =>
|
||||
this._scheduleAdaptivePanelLayout(...args),
|
||||
_scheduleRightPanelLayout: (...args) =>
|
||||
this._scheduleRightPanelLayout(...args),
|
||||
_setCockpitDisclosure: (...args) => this._setCockpitDisclosure(...args),
|
||||
_cockpitDisclosureOpen: (kind) => this._cockpitDisclosureOpen(kind),
|
||||
_setMapStack: (...args) => this._setMapStack(...args),
|
||||
_presentPanel: (...args) => this._presentPanel(...args),
|
||||
_syncShareState: (...args) => this._syncShareState(...args),
|
||||
setPanelCollapsed: (...args) => this.setPanelCollapsed(...args),
|
||||
},
|
||||
readHud: () => this.hud,
|
||||
readCockpit: () => this.cockpitView,
|
||||
readDataManager: () => this._dataManager,
|
||||
readShareLinks: () => this.shareLinkManager,
|
||||
readCelestialRing: () => this.celestialRing,
|
||||
readContextMode: () => this._contextMode,
|
||||
readContextChanging: () => this._contextModeChanging,
|
||||
readDisplayPortalActive: () => this._cockpitDisplayPortalActive,
|
||||
});
|
||||
|
||||
this._layerBindings = new LayerBindings({
|
||||
viewer,
|
||||
engine,
|
||||
services: {
|
||||
imageryHost: () =>
|
||||
resolveImageryHost({
|
||||
viewer,
|
||||
tileset: mapStackController?.getImageryHostTileset?.(),
|
||||
}),
|
||||
cachedGroundFloor: services.cachedGroundFloor,
|
||||
warmGroundFloor: services.warmGroundFloor,
|
||||
cctvLayer: services.cctvLayer,
|
||||
},
|
||||
readControls: () => ({
|
||||
hud: this.hud,
|
||||
_contextControls: this._contextControls,
|
||||
_cctvControls: this._cctvControls,
|
||||
_radioControls: this._radioControls,
|
||||
_streetLevelControls: this._streetLevelControls,
|
||||
}),
|
||||
operations: {
|
||||
_updateTrafficSyncChip: (...args) =>
|
||||
this._updateTrafficSyncChip(...args),
|
||||
_updateGlobalLoadingFeedback: (...args) =>
|
||||
this._updateGlobalLoadingFeedback(...args),
|
||||
_syncContextModeButtons: (...args) =>
|
||||
this._syncContextModeButtons(...args),
|
||||
_stampNavigation: (...args) => this._stampNavigation(...args),
|
||||
_runExplicitCctvFocus: (...args) => this._runExplicitCctvFocus(...args),
|
||||
_runExplicitWorldFocus: (...args) =>
|
||||
this._runExplicitWorldFocus(...args),
|
||||
runImmediateNavigation: (...args) =>
|
||||
this.runImmediateNavigation(...args),
|
||||
_showToast: (...args) => this._showToast(...args),
|
||||
},
|
||||
feedback: this._feedback,
|
||||
shareRestoration: this._shareRestoration,
|
||||
});
|
||||
}
|
||||
|
||||
/** Cockpit and the celestial ring of this globe. */
|
||||
_buildSceneCockpit() {
|
||||
const { viewer, engine } = this._scene;
|
||||
const services = this.services;
|
||||
const { CelestialRing } = services;
|
||||
this._cockpitCoordinator = new CockpitCoordinator({
|
||||
viewer,
|
||||
engine,
|
||||
services: {
|
||||
flightsLayer: services.flightsLayer,
|
||||
militaryFlightsLayer: services.militaryFlightsLayer,
|
||||
isTr3b: services.isTr3b,
|
||||
toggleTr3b: services.toggleTr3b,
|
||||
militaryAwarenessLayer: services.militaryAwarenessLayer,
|
||||
cachedGroundFloor: services.cachedGroundFloor,
|
||||
cachedMeshFloor: services.cachedMeshFloor,
|
||||
GROUND_FLOOR_LIFT_M: services.GROUND_FLOOR_LIFT_M,
|
||||
meshFloorPreferred: services.meshFloorPreferred,
|
||||
warmGroundFloor: services.warmGroundFloor,
|
||||
sampleMeshFloorCells: services.sampleMeshFloorCells,
|
||||
holdContinuousRender: services.holdContinuousRender,
|
||||
releaseContinuousRender: services.releaseContinuousRender,
|
||||
fetchRegionalBrief: services.fetchRegionalBrief,
|
||||
regionalDistanceM: services.regionalDistanceM,
|
||||
weatherCodeLabel: services.weatherCodeLabel,
|
||||
},
|
||||
elements: {
|
||||
_ppToggles: this._ppToggles,
|
||||
_cockpitDisplayPanel: this._cockpitDisplayPanel,
|
||||
_hudBtn: this._hudBtn,
|
||||
_detectionBtn: this._detectionBtn,
|
||||
_sliderPanel: this._sliderPanel,
|
||||
_models3dBtn: this._models3dBtn,
|
||||
},
|
||||
operations: {
|
||||
publishCockpit: {
|
||||
presence: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishPresence(view),
|
||||
brief: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishBrief(view),
|
||||
context: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishContext(view),
|
||||
instruments: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishInstruments(view),
|
||||
route: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishRoute(view),
|
||||
vision: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishVision(view),
|
||||
signals: (rows) =>
|
||||
useCockpitStore(applicationPinia()).publishSignals(rows),
|
||||
utilityLayout: (layout) =>
|
||||
useCockpitStore(applicationPinia()).publishUtilityLayout(layout),
|
||||
},
|
||||
publishCockpitPortal: (slots) =>
|
||||
useDisplayStore(applicationPinia()).publishCockpitPortal(slots),
|
||||
_layoutRightPanels: (...args) => this._layoutRightPanels(...args),
|
||||
_setCockpitVision: (...args) => this._setCockpitVision(...args),
|
||||
_stampNavigation: (...args) => this._stampNavigation(...args),
|
||||
getAircraftTrackingTarget: (...args) =>
|
||||
this.getAircraftTrackingTarget(...args),
|
||||
_scheduleRightPanelLayout: (...args) =>
|
||||
this._scheduleRightPanelLayout(...args),
|
||||
},
|
||||
readDataManager: () => this._dataManager,
|
||||
readContext: () => this.getContextModeState(),
|
||||
readActiveStyle: () => this.activeStyle,
|
||||
readUtilityDisclosureOpen: () =>
|
||||
this._cockpitDisclosureOpen('display') ||
|
||||
this._cockpitDisclosureOpen('radio'),
|
||||
enterPanels: () => this._panelChrome.enterCockpit(),
|
||||
exitPanels: () => this._panelChrome.exitCockpit(),
|
||||
});
|
||||
|
||||
// Full-globe sun/moon ring on either engine, below the HUD/readout.
|
||||
this.celestialRing = new CelestialRing(viewer ?? engine, {
|
||||
engine,
|
||||
enabled: false,
|
||||
store: useCelestialRingStore(applicationPinia()),
|
||||
onAutoDisable: () =>
|
||||
this.setCelestialRingEnabled(false, {
|
||||
syncShare: !!this.shareLinkManager,
|
||||
focus: false,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
/** The world-overlay host, detection and post-process stages of this globe. */
|
||||
_initSceneOverlays() {
|
||||
const { engine } = this._scene;
|
||||
const {
|
||||
initWorldOverlay,
|
||||
initDetection,
|
||||
initTrackedReadout,
|
||||
setDetectionStyle,
|
||||
trafficLayer,
|
||||
flightsLayer,
|
||||
militaryFlightsLayer,
|
||||
localAdsbLayer,
|
||||
satellitesLayer,
|
||||
cctvLayer,
|
||||
bikeshareLayer,
|
||||
transitLayer,
|
||||
aisLiveVesselsLayer,
|
||||
} = this.services;
|
||||
// The shared world-overlay host must own its one postRender lane before
|
||||
// detection and tracked-readout initialize. It stays transparent until a
|
||||
// production source explicitly registers entries.
|
||||
initWorldOverlay(engine);
|
||||
// Initialize detection overlay BEFORE style stages so the composite
|
||||
// stage is first in the post-process pipeline. Both run on the engine,
|
||||
// Navara's too.
|
||||
{
|
||||
initDetection(
|
||||
engine,
|
||||
[
|
||||
trafficLayer,
|
||||
flightsLayer,
|
||||
militaryFlightsLayer,
|
||||
localAdsbLayer,
|
||||
satellitesLayer,
|
||||
cctvLayer,
|
||||
bikeshareLayer,
|
||||
transitLayer,
|
||||
aisLiveVesselsLayer,
|
||||
].filter(Boolean),
|
||||
(modeLabel) => {
|
||||
this._updateDetectionButton(modeLabel);
|
||||
},
|
||||
);
|
||||
initTrackedReadout(engine);
|
||||
}
|
||||
setDetectionStyle(this.activeStyle);
|
||||
this._setDetectionDensity();
|
||||
|
||||
this._initStages();
|
||||
this._initBloomSharpen();
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach the shell to another globe (an engine switch): `{ viewer, engine,
|
||||
* mapStackController, services }`, where `services` are that catalog's
|
||||
* layer roles. The shell, its stores, open panels, typed text and focus
|
||||
* stay; the parts bound to a globe are built for this one and the
|
||||
* address's view is restored on it.
|
||||
*/
|
||||
attachScene(options = {}) {
|
||||
return this._queueSceneTransition(() => this._attachScene(options));
|
||||
}
|
||||
|
||||
_queueSceneTransition(work) {
|
||||
const run = (this._sceneTransition ?? Promise.resolve()).then(work, work);
|
||||
this._sceneTransition = run.catch(() => {});
|
||||
return run;
|
||||
}
|
||||
|
||||
async _attachScene({
|
||||
viewer = null,
|
||||
engine = null,
|
||||
mapStackController = null,
|
||||
services = {},
|
||||
engineSwitch = true,
|
||||
} = {}) {
|
||||
if (this._disposed) return;
|
||||
if (this._scene.engine === engine && this._scene.viewer === viewer) return;
|
||||
if (this._scene.engine)
|
||||
throw new Error('The shell is attached to a globe already');
|
||||
// An attachment that fails part-way releases what it built: the shell
|
||||
// stays detached, ready for the working engine.
|
||||
try {
|
||||
const previousServices = this.services;
|
||||
this.services = { ...this.services, ...services };
|
||||
this._scene = { viewer, engine, mapStackController };
|
||||
const {
|
||||
flightsLayer,
|
||||
militaryFlightsLayer,
|
||||
satellitesLayer,
|
||||
aisLiveVesselsLayer,
|
||||
militaryAwarenessLayer,
|
||||
rocketLaunchesLayer,
|
||||
} = this.services;
|
||||
this._navigation.tracking = {
|
||||
flightsLayer,
|
||||
militaryFlightsLayer,
|
||||
satellitesLayer,
|
||||
aisLiveVesselsLayer,
|
||||
militaryAwarenessLayer,
|
||||
rocketLaunchesLayer,
|
||||
};
|
||||
this._navigation.setScene({ viewer, engine });
|
||||
this._locationNavigation.attachScene({ viewer, engine });
|
||||
this.hud.attachEngine(engine, { viewer });
|
||||
this.shareLinkManager.attachEngine(engine);
|
||||
this._displayBindings.attachViewer(viewer);
|
||||
this._buildSceneControls();
|
||||
this._buildSceneCockpit();
|
||||
this._shareRestoration.attachLinks(this.shareLinkManager);
|
||||
this._initSceneOverlays();
|
||||
this._initMapStackControl();
|
||||
this._refreshLayerControls(previousServices);
|
||||
this._initCameraOrientationControls();
|
||||
this._initHudScene();
|
||||
this._initCockpitDisplayPortal();
|
||||
this._applyGlobalPostDefaults();
|
||||
this._startAnimationLoop();
|
||||
this._publishActiveStyle();
|
||||
this._shareRestoration.start({
|
||||
engineSwitch,
|
||||
retainScene: Boolean(this._layerSession?.handoffLayers),
|
||||
});
|
||||
this._layerBindings.observeCamera();
|
||||
this._layoutRightPanels();
|
||||
this._syncCctvPanelViewport();
|
||||
// Choices made between the engines apply once this engine restored
|
||||
// the address's view: the person's choice wins over the link.
|
||||
const pending = this._pendingVisual?.queue;
|
||||
this._pendingVisual = null;
|
||||
if (pending?.length) {
|
||||
const settings = this._visualSettings;
|
||||
void this.initialRestorePromise.then(() => {
|
||||
if (!this._disposed && this._visualSettings === settings)
|
||||
applyPendingVisualChoices(settings, pending);
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
await this._detachScene().catch((cleanupError) =>
|
||||
console.error(
|
||||
'The shell could not leave a failed globe:',
|
||||
cleanupError,
|
||||
),
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Detach the shell from its globe (an engine switch, or the page going).
|
||||
* The parts bound to that globe are released; the shell, its stores and
|
||||
* the open panels stay. `handoff` keeps the selection and a retainable
|
||||
* Context mode for the next globe.
|
||||
*/
|
||||
detachScene(options = {}) {
|
||||
return this._queueSceneTransition(() => this._detachScene(options));
|
||||
}
|
||||
|
||||
async _detachScene({
|
||||
handoff = Boolean(this._layerSession?.handoffLayers),
|
||||
} = {}) {
|
||||
if (!this._scene.engine && !this._scene.viewer) return;
|
||||
const { destroyTrackedReadout, destroyWorldOverlay, destroyDetection } =
|
||||
this.services;
|
||||
this._shareRestoration.destroy();
|
||||
this._navigation.setScene({}, { retainScene: handoff });
|
||||
this._layerBindings.stop();
|
||||
this._cockpitCoordinator.stop();
|
||||
this._visualSettings.stop();
|
||||
// A Context mode that cannot be carried to the next globe (a transition
|
||||
// in flight) restores the layers it changed, as a teardown does.
|
||||
if (!this._contextControls.canRetainScene()) {
|
||||
this._contextControls._contextModeGeneration++;
|
||||
await this._contextControls.restoreForDisposal();
|
||||
this._contextControls._contextModeChanging = false;
|
||||
}
|
||||
// IR boost teardown BEFORE detaching the data manager: restore fog and
|
||||
// un-boost both aircraft layers so the next globe does not inherit
|
||||
// sensor state (review P2, 2026-08-16).
|
||||
this._visualSettings.releaseIrBoost();
|
||||
this._cockpitCoordinator.destroy();
|
||||
this._layerBindings.disconnect();
|
||||
destroyTrackedReadout();
|
||||
destroyDetection();
|
||||
destroyWorldOverlay();
|
||||
this.celestialRing?.destroy();
|
||||
this.celestialRing = null;
|
||||
this._visualSettings.destroy();
|
||||
// Until the next globe: choices wait for it (pendingVisualSettings.js),
|
||||
// and the map-source chips and camera buttons answer nothing.
|
||||
this._pendingVisual = pendingVisualSettings(this._visualSettings);
|
||||
this._visualSettings = this._pendingVisual.settings;
|
||||
this._mapSourceControls?.destroy();
|
||||
this._mapSourceControls = null;
|
||||
useDisplayStore(applicationPinia()).connectMapSource(null);
|
||||
this._cameraOrientationControls?.destroy();
|
||||
this._cameraOrientationControls = null;
|
||||
if (this._orientationToken)
|
||||
useGlobeActionsStore(applicationPinia()).detach(this._orientationToken);
|
||||
this._orientationToken = null;
|
||||
this._displayBindings.attachViewer(null);
|
||||
this._locationNavigation.detachScene();
|
||||
this.hud.attachEngine(null);
|
||||
this.shareLinkManager.attachEngine(null);
|
||||
this._scene = { viewer: null, engine: null, mapStackController: null };
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild a panel's controls whose layer is another instance in the new
|
||||
* catalog (a layer this engine left out, then shows). Layers the session
|
||||
* keeps are the same instances, so their controls stay.
|
||||
*/
|
||||
_refreshLayerControls(previous) {
|
||||
const changed = (...roles) =>
|
||||
roles.some((role) => previous?.[role] !== this.services[role]);
|
||||
if (changed('cctvLayer')) this._initCctvPanel();
|
||||
if (changed('radioLayer', 'localAdsbLayer')) this._initRadioPanel();
|
||||
if (changed('streetLevelLayer')) this._initStreetLevelPanel();
|
||||
this._initWildlifeSightingCard();
|
||||
if (
|
||||
changed(
|
||||
'radioLayer',
|
||||
'militaryInstallationsLayer',
|
||||
'militaryAwarenessLayer',
|
||||
'rocketLaunchesLayer',
|
||||
)
|
||||
) {
|
||||
this._contextControls.stop();
|
||||
this._contextControls.disconnect();
|
||||
this._initGlobalContextPanel();
|
||||
}
|
||||
}
|
||||
|
||||
/** The attached globe's Cesium viewer; null on Navara or between engines. */
|
||||
get viewer() {
|
||||
return this._scene?.viewer ?? null;
|
||||
@@ -2074,9 +1623,7 @@ export class StyleManager extends ShellFacade {
|
||||
async dispose() {
|
||||
if (this._disposed) return;
|
||||
const layerSession = this._layerSession;
|
||||
const handoff =
|
||||
Boolean(layerSession?.handoffLayers) &&
|
||||
!layerSession.lifetime.signal.aborted;
|
||||
const handoff = retainsLayerSession(layerSession);
|
||||
// A Context mode the next shell can resume when the session is handed to
|
||||
// a new application.
|
||||
const retainContext = handoff && this._contextControls.canRetainScene();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { createFakeEngine } from '../globe/testing/fakeEngine.js';
|
||||
import test, { after, before } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { assertSameNode } from '../testSupport/domAssert.mjs';
|
||||
@@ -383,6 +384,7 @@ test('the real director preserves a selected shot label for the following double
|
||||
const f = fixture();
|
||||
const previousStorage = globalThis.localStorage;
|
||||
let director;
|
||||
const engine = createFakeEngine();
|
||||
try {
|
||||
f.owner.destroy();
|
||||
Object.defineProperty(globalThis, 'localStorage', {
|
||||
@@ -393,7 +395,7 @@ test('the real director preserves a selected shot label for the following double
|
||||
setItem() {},
|
||||
},
|
||||
});
|
||||
director = new SceneDirector({ camera: { cancelFlight() {} } }, {}, {});
|
||||
director = new SceneDirector({ engine }, {}, {});
|
||||
await nextTick();
|
||||
const label = f.label();
|
||||
label.click();
|
||||
@@ -406,6 +408,7 @@ test('the real director preserves a selected shot label for the following double
|
||||
assert.equal(director._getSelectedScene().shots[0].title, 'Renamed');
|
||||
} finally {
|
||||
await director?.destroy();
|
||||
engine.destroy();
|
||||
Object.defineProperty(globalThis, 'localStorage', {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
|
||||
@@ -0,0 +1,459 @@
|
||||
import { retainsLayerSession } from '../app/layerSession.js';
|
||||
import { resolveImageryHost } from '../layers/weather/imageryHost.js';
|
||||
import { LayerBindings } from './layerBindings.js';
|
||||
import { VisualSettings } from './visualSettings.js';
|
||||
import { ShareRestoration } from './shareRestoration.js';
|
||||
import { CockpitCoordinator } from './cockpitCoordinator.js';
|
||||
import { useCelestialRingStore } from './stores/celestialRing.js';
|
||||
import {
|
||||
applyPendingVisualChoices,
|
||||
pendingVisualSettings,
|
||||
} from './pendingVisualSettings.js';
|
||||
import { ShellFacade } from './shellFacade.js';
|
||||
import { applyShareFollowOffset } from './shareFollow.js';
|
||||
import { applicationPinia } from './vueRuntime.js';
|
||||
import { useCockpitStore } from './stores/cockpit.js';
|
||||
import { useDisplayStore } from './stores/display.js';
|
||||
import { useGlobeActionsStore } from './stores/globeActions.js';
|
||||
|
||||
/** Globe-bound composition kept separately from the page shell. */
|
||||
export class ShellScene extends ShellFacade {
|
||||
// ── Scene attachment ──────────────────────────────────────────────────
|
||||
// The shell lives for the page; an engine switch only rebuilds the parts
|
||||
// bound to one globe (share restoration, visual effects, layer bindings,
|
||||
// Cockpit, the celestial ring, the overlay host, detection, the map-source
|
||||
// and camera-orientation controls) and points the kept ones (navigation,
|
||||
// location search, HUD, share link, display bindings) at the next globe.
|
||||
|
||||
/** Share restoration, visual settings and layer bindings of this globe. */
|
||||
_buildSceneControls() {
|
||||
const { viewer, engine, mapStackController } = this._scene;
|
||||
const services = this.services;
|
||||
const layerSession = this._layerSession;
|
||||
this._shareRestoration = new ShareRestoration({
|
||||
engine,
|
||||
canvas: engine?.host.canvas ?? viewer?.canvas,
|
||||
handoffLayers: layerSession?.handoffLayers,
|
||||
navigation: this._navigation,
|
||||
syncShareState: () => this._syncShareState(),
|
||||
syncModels3d: (state) => this._syncModels3dFromLayerState(state),
|
||||
showStatus: (message, options) =>
|
||||
this._showGlobalStatusNotice(message, options),
|
||||
feedback: this._feedback,
|
||||
updateFeedback: () => this._updateGlobalLoadingFeedback(),
|
||||
applyFollowOffset: (handle, offset) =>
|
||||
applyShareFollowOffset(engine, handle, offset),
|
||||
});
|
||||
|
||||
this._visualSettings = new VisualSettings({
|
||||
viewer,
|
||||
engine,
|
||||
mapStackController,
|
||||
services: {
|
||||
setScopeTerminusOverride: services.setScopeTerminusOverride,
|
||||
clampScopeTerminusPct: services.clampScopeTerminusPct,
|
||||
getDetectionMode: services.getDetectionMode,
|
||||
getDetectionTuning: services.getDetectionTuning,
|
||||
getKeyholeFadeTuning: services.getKeyholeFadeTuning,
|
||||
getScopeMaskFeather: services.getScopeMaskFeather,
|
||||
getScopeTerminusOverride: services.getScopeTerminusOverride,
|
||||
governorRequestRender: services.governorRequestRender,
|
||||
holdContinuousRender: services.holdContinuousRender,
|
||||
isCelestialRingStyleSupported: services.isCelestialRingStyleSupported,
|
||||
isScopeMaskEnabled: services.isScopeMaskEnabled,
|
||||
readDetectionDiagnostics: services.readDetectionDiagnostics,
|
||||
releaseContinuousRender: services.releaseContinuousRender,
|
||||
setDetectionModeByLabel: services.setDetectionModeByLabel,
|
||||
setDetectionStyle: services.setDetectionStyle,
|
||||
setDetectionTuning: services.setDetectionTuning,
|
||||
setKeyholeFadeTuning: services.setKeyholeFadeTuning,
|
||||
setScopeMaskEnabled: services.setScopeMaskEnabled,
|
||||
setScopeMaskFeather: services.setScopeMaskFeather,
|
||||
},
|
||||
elements: {
|
||||
_ppToggles: this._ppToggles,
|
||||
_sliderPanel: this._sliderPanel,
|
||||
},
|
||||
operations: {
|
||||
_restorePanelState: (...args) => this._restorePanelState(...args),
|
||||
_layoutRightPanels: (...args) => this._layoutRightPanels(...args),
|
||||
_scheduleAdaptivePanelLayout: (...args) =>
|
||||
this._scheduleAdaptivePanelLayout(...args),
|
||||
_scheduleRightPanelLayout: (...args) =>
|
||||
this._scheduleRightPanelLayout(...args),
|
||||
_setCockpitDisclosure: (...args) => this._setCockpitDisclosure(...args),
|
||||
_cockpitDisclosureOpen: (kind) => this._cockpitDisclosureOpen(kind),
|
||||
_setMapStack: (...args) => this._setMapStack(...args),
|
||||
_presentPanel: (...args) => this._presentPanel(...args),
|
||||
_syncShareState: (...args) => this._syncShareState(...args),
|
||||
setPanelCollapsed: (...args) => this.setPanelCollapsed(...args),
|
||||
},
|
||||
readHud: () => this.hud,
|
||||
readCockpit: () => this.cockpitView,
|
||||
readDataManager: () => this._dataManager,
|
||||
readShareLinks: () => this.shareLinkManager,
|
||||
readCelestialRing: () => this.celestialRing,
|
||||
readContextMode: () => this._contextMode,
|
||||
readContextChanging: () => this._contextModeChanging,
|
||||
readDisplayPortalActive: () => this._cockpitDisplayPortalActive,
|
||||
});
|
||||
|
||||
this._layerBindings = new LayerBindings({
|
||||
viewer,
|
||||
engine,
|
||||
services: {
|
||||
imageryHost: () =>
|
||||
resolveImageryHost({
|
||||
viewer,
|
||||
tileset: mapStackController?.getImageryHostTileset?.(),
|
||||
}),
|
||||
cachedGroundFloor: services.cachedGroundFloor,
|
||||
warmGroundFloor: services.warmGroundFloor,
|
||||
cctvLayer: services.cctvLayer,
|
||||
},
|
||||
readControls: () => ({
|
||||
hud: this.hud,
|
||||
_contextControls: this._contextControls,
|
||||
_cctvControls: this._cctvControls,
|
||||
_radioControls: this._radioControls,
|
||||
_streetLevelControls: this._streetLevelControls,
|
||||
}),
|
||||
operations: {
|
||||
_updateTrafficSyncChip: (...args) =>
|
||||
this._updateTrafficSyncChip(...args),
|
||||
_updateGlobalLoadingFeedback: (...args) =>
|
||||
this._updateGlobalLoadingFeedback(...args),
|
||||
_syncContextModeButtons: (...args) =>
|
||||
this._syncContextModeButtons(...args),
|
||||
_stampNavigation: (...args) => this._stampNavigation(...args),
|
||||
_runExplicitCctvFocus: (...args) => this._runExplicitCctvFocus(...args),
|
||||
_runExplicitWorldFocus: (...args) =>
|
||||
this._runExplicitWorldFocus(...args),
|
||||
runImmediateNavigation: (...args) =>
|
||||
this.runImmediateNavigation(...args),
|
||||
_showToast: (...args) => this._showToast(...args),
|
||||
},
|
||||
feedback: this._feedback,
|
||||
shareRestoration: this._shareRestoration,
|
||||
});
|
||||
}
|
||||
|
||||
/** Cockpit and the celestial ring of this globe. */
|
||||
_buildSceneCockpit() {
|
||||
const { viewer, engine } = this._scene;
|
||||
const services = this.services;
|
||||
const { CelestialRing } = services;
|
||||
this._cockpitCoordinator = new CockpitCoordinator({
|
||||
viewer,
|
||||
engine,
|
||||
services: {
|
||||
flightsLayer: services.flightsLayer,
|
||||
militaryFlightsLayer: services.militaryFlightsLayer,
|
||||
isTr3b: services.isTr3b,
|
||||
toggleTr3b: services.toggleTr3b,
|
||||
militaryAwarenessLayer: services.militaryAwarenessLayer,
|
||||
cachedGroundFloor: services.cachedGroundFloor,
|
||||
cachedMeshFloor: services.cachedMeshFloor,
|
||||
GROUND_FLOOR_LIFT_M: services.GROUND_FLOOR_LIFT_M,
|
||||
meshFloorPreferred: services.meshFloorPreferred,
|
||||
warmGroundFloor: services.warmGroundFloor,
|
||||
sampleMeshFloorCells: services.sampleMeshFloorCells,
|
||||
holdContinuousRender: services.holdContinuousRender,
|
||||
releaseContinuousRender: services.releaseContinuousRender,
|
||||
fetchRegionalBrief: services.fetchRegionalBrief,
|
||||
regionalDistanceM: services.regionalDistanceM,
|
||||
weatherCodeLabel: services.weatherCodeLabel,
|
||||
},
|
||||
elements: {
|
||||
_ppToggles: this._ppToggles,
|
||||
_cockpitDisplayPanel: this._cockpitDisplayPanel,
|
||||
_hudBtn: this._hudBtn,
|
||||
_detectionBtn: this._detectionBtn,
|
||||
_sliderPanel: this._sliderPanel,
|
||||
_models3dBtn: this._models3dBtn,
|
||||
},
|
||||
operations: {
|
||||
publishCockpit: {
|
||||
presence: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishPresence(view),
|
||||
brief: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishBrief(view),
|
||||
context: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishContext(view),
|
||||
instruments: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishInstruments(view),
|
||||
route: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishRoute(view),
|
||||
vision: (view) =>
|
||||
useCockpitStore(applicationPinia()).publishVision(view),
|
||||
signals: (rows) =>
|
||||
useCockpitStore(applicationPinia()).publishSignals(rows),
|
||||
utilityLayout: (layout) =>
|
||||
useCockpitStore(applicationPinia()).publishUtilityLayout(layout),
|
||||
},
|
||||
publishCockpitPortal: (slots) =>
|
||||
useDisplayStore(applicationPinia()).publishCockpitPortal(slots),
|
||||
_layoutRightPanels: (...args) => this._layoutRightPanels(...args),
|
||||
_setCockpitVision: (...args) => this._setCockpitVision(...args),
|
||||
_stampNavigation: (...args) => this._stampNavigation(...args),
|
||||
getAircraftTrackingTarget: (...args) =>
|
||||
this.getAircraftTrackingTarget(...args),
|
||||
_scheduleRightPanelLayout: (...args) =>
|
||||
this._scheduleRightPanelLayout(...args),
|
||||
},
|
||||
readDataManager: () => this._dataManager,
|
||||
readContext: () => this.getContextModeState(),
|
||||
readActiveStyle: () => this.activeStyle,
|
||||
readUtilityDisclosureOpen: () =>
|
||||
this._cockpitDisclosureOpen('display') ||
|
||||
this._cockpitDisclosureOpen('radio'),
|
||||
enterPanels: () => this._panelChrome.enterCockpit(),
|
||||
exitPanels: () => this._panelChrome.exitCockpit(),
|
||||
});
|
||||
|
||||
// Full-globe sun/moon ring on either engine, below the HUD/readout.
|
||||
this.celestialRing = new CelestialRing(viewer ?? engine, {
|
||||
engine,
|
||||
enabled: false,
|
||||
store: useCelestialRingStore(applicationPinia()),
|
||||
onAutoDisable: () =>
|
||||
this.setCelestialRingEnabled(false, {
|
||||
syncShare: !!this.shareLinkManager,
|
||||
focus: false,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
/** The world-overlay host, detection and post-process stages of this globe. */
|
||||
_initSceneOverlays() {
|
||||
const { engine } = this._scene;
|
||||
const {
|
||||
initWorldOverlay,
|
||||
initDetection,
|
||||
initTrackedReadout,
|
||||
setDetectionStyle,
|
||||
trafficLayer,
|
||||
flightsLayer,
|
||||
militaryFlightsLayer,
|
||||
localAdsbLayer,
|
||||
satellitesLayer,
|
||||
cctvLayer,
|
||||
bikeshareLayer,
|
||||
transitLayer,
|
||||
aisLiveVesselsLayer,
|
||||
} = this.services;
|
||||
// The shared world-overlay host must own its one postRender lane before
|
||||
// detection and tracked-readout initialize. It stays transparent until a
|
||||
// production source explicitly registers entries.
|
||||
initWorldOverlay(engine);
|
||||
// Initialize detection overlay BEFORE style stages so the composite
|
||||
// stage is first in the post-process pipeline. Both run on the engine,
|
||||
// Navara's too.
|
||||
{
|
||||
initDetection(
|
||||
engine,
|
||||
[
|
||||
trafficLayer,
|
||||
flightsLayer,
|
||||
militaryFlightsLayer,
|
||||
localAdsbLayer,
|
||||
satellitesLayer,
|
||||
cctvLayer,
|
||||
bikeshareLayer,
|
||||
transitLayer,
|
||||
aisLiveVesselsLayer,
|
||||
].filter(Boolean),
|
||||
(modeLabel) => {
|
||||
this._updateDetectionButton(modeLabel);
|
||||
},
|
||||
);
|
||||
initTrackedReadout(engine);
|
||||
}
|
||||
setDetectionStyle(this.activeStyle);
|
||||
this._setDetectionDensity();
|
||||
|
||||
this._initStages();
|
||||
this._initBloomSharpen();
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach the shell to another globe (an engine switch): `{ viewer, engine,
|
||||
* mapStackController, services }`, where `services` are that catalog's
|
||||
* layer roles. The shell, its stores, open panels, typed text and focus
|
||||
* stay; the parts bound to a globe are built for this one and the
|
||||
* address's view is restored on it.
|
||||
*/
|
||||
attachScene(options = {}) {
|
||||
return this._queueSceneTransition(() => this._attachScene(options));
|
||||
}
|
||||
|
||||
_queueSceneTransition(work) {
|
||||
const run = (this._sceneTransition ?? Promise.resolve()).then(work, work);
|
||||
this._sceneTransition = run.catch(() => {});
|
||||
return run;
|
||||
}
|
||||
|
||||
async _attachScene({
|
||||
viewer = null,
|
||||
engine = null,
|
||||
mapStackController = null,
|
||||
services = {},
|
||||
engineSwitch = true,
|
||||
} = {}) {
|
||||
if (this._disposed) return;
|
||||
if (this._scene.engine === engine && this._scene.viewer === viewer) return;
|
||||
if (this._scene.engine)
|
||||
throw new Error('The shell is attached to a globe already');
|
||||
// An attachment that fails part-way releases what it built: the shell
|
||||
// stays detached, ready for the working engine.
|
||||
try {
|
||||
const previousServices = this.services;
|
||||
this.services = { ...this.services, ...services };
|
||||
this._scene = { viewer, engine, mapStackController };
|
||||
const {
|
||||
flightsLayer,
|
||||
militaryFlightsLayer,
|
||||
satellitesLayer,
|
||||
aisLiveVesselsLayer,
|
||||
militaryAwarenessLayer,
|
||||
rocketLaunchesLayer,
|
||||
} = this.services;
|
||||
this._navigation.tracking = {
|
||||
flightsLayer,
|
||||
militaryFlightsLayer,
|
||||
satellitesLayer,
|
||||
aisLiveVesselsLayer,
|
||||
militaryAwarenessLayer,
|
||||
rocketLaunchesLayer,
|
||||
};
|
||||
this._navigation.setScene({ viewer, engine });
|
||||
this._locationNavigation.attachScene({ viewer, engine });
|
||||
this.hud.attachEngine(engine, { viewer });
|
||||
this.shareLinkManager.attachEngine(engine);
|
||||
this._displayBindings.attachViewer(viewer);
|
||||
this._buildSceneControls();
|
||||
this._buildSceneCockpit();
|
||||
this._shareRestoration.attachLinks(this.shareLinkManager);
|
||||
this._initSceneOverlays();
|
||||
this._initMapStackControl();
|
||||
this._refreshLayerControls(previousServices);
|
||||
this._initCameraOrientationControls();
|
||||
this._initHudScene();
|
||||
this._initCockpitDisplayPortal();
|
||||
this._applyGlobalPostDefaults();
|
||||
this._startAnimationLoop();
|
||||
this._publishActiveStyle();
|
||||
this._shareRestoration.start({
|
||||
engineSwitch,
|
||||
retainScene: Boolean(this._layerSession?.handoffLayers),
|
||||
});
|
||||
this._layerBindings.observeCamera();
|
||||
this._layoutRightPanels();
|
||||
this._syncCctvPanelViewport();
|
||||
// Choices made between the engines apply once this engine restored
|
||||
// the address's view: the person's choice wins over the link.
|
||||
const pending = this._pendingVisual?.queue;
|
||||
this._pendingVisual = null;
|
||||
if (pending?.length) {
|
||||
const settings = this._visualSettings;
|
||||
void this.initialRestorePromise.then(() => {
|
||||
if (!this._disposed && this._visualSettings === settings)
|
||||
applyPendingVisualChoices(settings, pending);
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
await this._detachScene().catch((cleanupError) =>
|
||||
console.error(
|
||||
'The shell could not leave a failed globe:',
|
||||
cleanupError,
|
||||
),
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Detach the shell from its globe (an engine switch, or the page going).
|
||||
* The parts bound to that globe are released; the shell, its stores and
|
||||
* the open panels stay. `handoff` keeps the selection and a retainable
|
||||
* Context mode for the next globe.
|
||||
*/
|
||||
detachScene(options = {}) {
|
||||
return this._queueSceneTransition(() => this._detachScene(options));
|
||||
}
|
||||
|
||||
async _detachScene({
|
||||
handoff = retainsLayerSession(this._layerSession),
|
||||
} = {}) {
|
||||
if (!this._scene.engine && !this._scene.viewer) return;
|
||||
const { destroyTrackedReadout, destroyWorldOverlay, destroyDetection } =
|
||||
this.services;
|
||||
this._shareRestoration.destroy();
|
||||
this._navigation.setScene({}, { retainScene: handoff });
|
||||
this._layerBindings.stop();
|
||||
this._cockpitCoordinator.stop();
|
||||
this._visualSettings.stop();
|
||||
// A Context mode that cannot be carried to the next globe (a transition
|
||||
// in flight) restores the layers it changed, as a teardown does.
|
||||
if (!this._contextControls.canRetainScene()) {
|
||||
this._contextControls._contextModeGeneration++;
|
||||
await this._contextControls.restoreForDisposal();
|
||||
this._contextControls._contextModeChanging = false;
|
||||
}
|
||||
// IR boost teardown BEFORE detaching the data manager: restore fog and
|
||||
// un-boost both aircraft layers so the next globe does not inherit
|
||||
// sensor state.
|
||||
this._visualSettings.releaseIrBoost();
|
||||
this._cockpitCoordinator.destroy();
|
||||
this._layerBindings.disconnect();
|
||||
destroyTrackedReadout();
|
||||
destroyDetection();
|
||||
destroyWorldOverlay();
|
||||
this.celestialRing?.destroy();
|
||||
this.celestialRing = null;
|
||||
this._visualSettings.destroy();
|
||||
// Until the next globe: choices wait for it (pendingVisualSettings.js),
|
||||
// and the map-source chips and camera buttons answer nothing.
|
||||
this._pendingVisual = pendingVisualSettings(this._visualSettings);
|
||||
this._visualSettings = this._pendingVisual.settings;
|
||||
this._mapSourceControls?.destroy();
|
||||
this._mapSourceControls = null;
|
||||
useDisplayStore(applicationPinia()).connectMapSource(null);
|
||||
this._cameraOrientationControls?.destroy();
|
||||
this._cameraOrientationControls = null;
|
||||
if (this._orientationToken)
|
||||
useGlobeActionsStore(applicationPinia()).detach(this._orientationToken);
|
||||
this._orientationToken = null;
|
||||
this._displayBindings.attachViewer(null);
|
||||
this._locationNavigation.detachScene();
|
||||
this.hud.attachEngine(null);
|
||||
this.shareLinkManager.attachEngine(null);
|
||||
this._scene = { viewer: null, engine: null, mapStackController: null };
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild a panel's controls whose layer is another instance in the new
|
||||
* catalog (a layer this engine left out, then shows). Layers the session
|
||||
* keeps are the same instances, so their controls stay.
|
||||
*/
|
||||
_refreshLayerControls(previous) {
|
||||
const changed = (...roles) =>
|
||||
roles.some((role) => previous?.[role] !== this.services[role]);
|
||||
if (changed('cctvLayer')) this._initCctvPanel();
|
||||
if (changed('radioLayer', 'localAdsbLayer')) this._initRadioPanel();
|
||||
if (changed('streetLevelLayer')) this._initStreetLevelPanel();
|
||||
this._initWildlifeSightingCard();
|
||||
if (
|
||||
changed(
|
||||
'radioLayer',
|
||||
'militaryInstallationsLayer',
|
||||
'militaryAwarenessLayer',
|
||||
'rocketLaunchesLayer',
|
||||
)
|
||||
) {
|
||||
this._contextControls.stop();
|
||||
this._contextControls.disconnect();
|
||||
this._initGlobalContextPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user