diff --git a/src/scopeMask.js b/src/scopeMask.js index 770539ca8..510ea151a 100644 --- a/src/scopeMask.js +++ b/src/scopeMask.js @@ -549,7 +549,10 @@ export function getScopeMaskFeather() { * @returns {void} */ export function setScopeMaskOpacity(ratio) { - _maskOpacity = Math.max(0, Math.min(1, Number.isFinite(Number(ratio)) ? Number(ratio) : 1)); + _maskOpacity = Math.max( + 0, + Math.min(1, Number.isFinite(Number(ratio)) ? Number(ratio) : 1), + ); if (_canvas) _canvas.style.opacity = String(_maskOpacity); } diff --git a/src/share/viewCodec.js b/src/share/viewCodec.js index a95255789..1b444d2b9 100644 --- a/src/share/viewCodec.js +++ b/src/share/viewCodec.js @@ -781,7 +781,12 @@ export function normalizeShareViewState(input = {}) { state.scopeFeatherPct = finite(source.scopeFeatherPct) ? clampScopeFeatherPct(Number(source.scopeFeatherPct)) : d.scopeFeatherPct; - state.scopeOpacityPct = intOr(source.scopeOpacityPct, d.scopeOpacityPct, 0, 100); + state.scopeOpacityPct = intOr( + source.scopeOpacityPct, + d.scopeOpacityPct, + 0, + 100, + ); state.scopeTerminusPct = intOr( source.scopeTerminusPct, null, diff --git a/src/sharelink.js b/src/sharelink.js index 3b873ef30..5715d581c 100644 --- a/src/sharelink.js +++ b/src/sharelink.js @@ -289,7 +289,10 @@ export class ShareLinkManager { // mirrors live state for the link this session generates, so it must match // the mask, not the archive.) scopeFeatherPct: clampScopeFeatherPct(parseOr(params.get('scf'), 35)), - scopeOpacityPct: Math.max(0, Math.min(100, Math.round(parseOr(params.get('sco'), 100)))), + scopeOpacityPct: Math.max( + 0, + Math.min(100, Math.round(parseOr(params.get('sco'), 100))), + ), // Absent (or non-numeric) `sce` = adaptive (null), the default behavior; // a value pins the terminus opacity percent, clamped into the SUPPORTED // 94..100 band. `sce=0` used to survive as a sub-94 terminus — a hole in @@ -631,7 +634,10 @@ export class ShareLinkManager { this._scopeFeatherPct = clampScopeFeatherPct(extras.scopeFeatherPct); } if (typeof extras.scopeOpacityPct === 'number') { - this._scopeOpacityPct = Math.max(0, Math.min(100, Math.round(extras.scopeOpacityPct))); + this._scopeOpacityPct = Math.max( + 0, + Math.min(100, Math.round(extras.scopeOpacityPct)), + ); } if (extras.scopeTerminusPct === null) this._scopeTerminusPct = null; else if (typeof extras.scopeTerminusPct === 'number') { @@ -748,7 +754,8 @@ export class ShareLinkManager { params.set('cr', this._celestialRingEnabled ? '1' : '0'); params.set('sc', this._scopeEnabled ? '1' : '0'); params.set('scf', Math.round(this._scopeFeatherPct).toString()); - if (this._scopeOpacityPct !== 100) params.set('sco', String(this._scopeOpacityPct)); + if (this._scopeOpacityPct !== 100) + params.set('sco', String(this._scopeOpacityPct)); // Only written when pinned — an absent `sce` IS the adaptive default, so a // shared link never freezes the ramp for the recipient by accident. The // same 94..100 clamp applies on the way OUT, so a link can never carry an diff --git a/src/ui/applicationShell.js b/src/ui/applicationShell.js index 2e5af67d0..a7d6fa29f 100644 --- a/src/ui/applicationShell.js +++ b/src/ui/applicationShell.js @@ -595,7 +595,8 @@ export class StyleManager extends ShellFacade { this._setDetectionAllocation(...args), _setDetectionFade: (...args) => this._setDetectionFade(...args), _setScope: (...args) => this._visualSettings._setScope(...args), - _applyGlobalPostDefaults: (...args) => this._applyGlobalPostDefaults(...args), + _applyGlobalPostDefaults: (...args) => + this._applyGlobalPostDefaults(...args), setCelestialRingEnabled: (...args) => this.setCelestialRingEnabled(...args), _setModels3dEnabled: (...args) => this._setModels3dEnabled(...args), diff --git a/src/ui/visualSettings.js b/src/ui/visualSettings.js index 236d34816..2b67847cd 100644 --- a/src/ui/visualSettings.js +++ b/src/ui/visualSettings.js @@ -137,7 +137,8 @@ export class VisualSettings { this._setScope({ enabled: scopeEnabled, featherPct: scopeFeatherPct, - opacityPct: typeof scopeOpacityPct === 'number' ? scopeOpacityPct : undefined, + opacityPct: + typeof scopeOpacityPct === 'number' ? scopeOpacityPct : undefined, }); // null restores the altitude-adaptive ramp; a number pins the terminus // (clamped to the supported 94..100 band, same as the `sce` hash key).