style: format Context component modules

This commit is contained in:
Sameh Khamis committed 2026-09-13 01:41:01 -07:00
1 parent fc369cc65a
commit 3e078ef49d
11 files changed
+1175 -801

No files matched your search

+89 -25
View File
@@ -1,9 +1,25 @@
import { _initGlobalContextPanel } from './contextBindings.js';
import { _syncContextModeButtons } from './contextPresentation.js';
import { _trackContextLayerReaction, _waitForContextLayerSettlement, _captureContextSessionSnapshot, _restoreContextSession, _restoreContextSessionAfterLayerSettles } from './contextSession.js';
import { _selectContextMode, _deactivateContextForLayerChange, _clearLayersOutsideContextMode } from './contextTransactions.js';
import {
_trackContextLayerReaction,
_waitForContextLayerSettlement,
_captureContextSessionSnapshot,
_restoreContextSession,
_restoreContextSessionAfterLayerSettles,
} from './contextSession.js';
import {
_selectContextMode,
_deactivateContextForLayerChange,
_clearLayersOutsideContextMode,
} from './contextTransactions.js';
import { _handleContextLayerChange } from './contextLayerChanges.js';
import { _runUserFacingContextAction, _claimContextVisualAuthority, getContextModeState, setContextMode, clearSelectedLayers } from './contextActions.js';
import {
_runUserFacingContextAction,
_claimContextVisualAuthority,
getContextModeState,
setContextMode,
clearSelectedLayers,
} from './contextActions.js';
import { connectContextManager } from './contextSubscriptions.js';
/** Own Context transactions and controls through explicit layer and presentation ports. */
@@ -31,15 +47,31 @@ export class ContextControls {
this._clearSelectedLayersManagerPromise = null;
this._initGlobalContextPanel();
}
showToast(...args) { if (!this.destroyed) this.actions.showToast(...args); }
setClearBusy(...args) { if (!this.destroyed) this.actions.setClearBusy(...args); }
get cockpitView() { return this.actions.getCockpit(); }
showToast(...args) {
if (!this.destroyed) this.actions.showToast(...args);
}
setClearBusy(...args) {
if (!this.destroyed) this.actions.setClearBusy(...args);
}
get cockpitView() {
return this.actions.getCockpit();
}
listen(target, type, callback, options = {}) {
target?.addEventListener(type, callback, { ...options, signal: this.listeners.signal });
target?.addEventListener(type, callback, {
...options,
signal: this.listeners.signal,
});
}
connect(manager) {
return connectContextManager.call(this, manager);
}
connect(manager) { return connectContextManager.call(this, manager); }
disconnect() {
for (const field of ['_contextManagerUnsubscribe', '_dataManagerBeforeDestroyUnsubscribe', '_dataManagerVisibilityGuardUnsubscribe', '_dataManagerVisibilityRequestUnsubscribe']) {
for (const field of [
'_contextManagerUnsubscribe',
'_dataManagerBeforeDestroyUnsubscribe',
'_dataManagerVisibilityGuardUnsubscribe',
'_dataManagerVisibilityRequestUnsubscribe',
]) {
this[field]?.();
this[field] = null;
}
@@ -55,20 +87,52 @@ export class ContextControls {
this._contextMode = null;
await this._restoreContextSession();
}
_initGlobalContextPanel(...args) { return _initGlobalContextPanel.call(this, ...args); }
_syncContextModeButtons(...args) { return _syncContextModeButtons.call(this, ...args); }
_trackContextLayerReaction(...args) { return _trackContextLayerReaction.call(this, ...args); }
_waitForContextLayerSettlement(...args) { return _waitForContextLayerSettlement.call(this, ...args); }
_captureContextSessionSnapshot(...args) { return _captureContextSessionSnapshot.call(this, ...args); }
_restoreContextSession(...args) { return _restoreContextSession.call(this, ...args); }
_restoreContextSessionAfterLayerSettles(...args) { return _restoreContextSessionAfterLayerSettles.call(this, ...args); }
_selectContextMode(...args) { return _selectContextMode.call(this, ...args); }
_deactivateContextForLayerChange(...args) { return _deactivateContextForLayerChange.call(this, ...args); }
_clearLayersOutsideContextMode(...args) { return _clearLayersOutsideContextMode.call(this, ...args); }
_handleContextLayerChange(...args) { return _handleContextLayerChange.call(this, ...args); }
_runUserFacingContextAction(...args) { return _runUserFacingContextAction.call(this, ...args); }
_claimContextVisualAuthority(...args) { return _claimContextVisualAuthority.call(this, ...args); }
getContextModeState(...args) { return getContextModeState.call(this, ...args); }
setContextMode(...args) { return setContextMode.call(this, ...args); }
clearSelectedLayers(...args) { return clearSelectedLayers.call(this, ...args); }
_initGlobalContextPanel(...args) {
return _initGlobalContextPanel.call(this, ...args);
}
_syncContextModeButtons(...args) {
return _syncContextModeButtons.call(this, ...args);
}
_trackContextLayerReaction(...args) {
return _trackContextLayerReaction.call(this, ...args);
}
_waitForContextLayerSettlement(...args) {
return _waitForContextLayerSettlement.call(this, ...args);
}
_captureContextSessionSnapshot(...args) {
return _captureContextSessionSnapshot.call(this, ...args);
}
_restoreContextSession(...args) {
return _restoreContextSession.call(this, ...args);
}
_restoreContextSessionAfterLayerSettles(...args) {
return _restoreContextSessionAfterLayerSettles.call(this, ...args);
}
_selectContextMode(...args) {
return _selectContextMode.call(this, ...args);
}
_deactivateContextForLayerChange(...args) {
return _deactivateContextForLayerChange.call(this, ...args);
}
_clearLayersOutsideContextMode(...args) {
return _clearLayersOutsideContextMode.call(this, ...args);
}
_handleContextLayerChange(...args) {
return _handleContextLayerChange.call(this, ...args);
}
_runUserFacingContextAction(...args) {
return _runUserFacingContextAction.call(this, ...args);
}
_claimContextVisualAuthority(...args) {
return _claimContextVisualAuthority.call(this, ...args);
}
getContextModeState(...args) {
return getContextModeState.call(this, ...args);
}
setContextMode(...args) {
return setContextMode.call(this, ...args);
}
clearSelectedLayers(...args) {
return clearSelectedLayers.call(this, ...args);
}
}