mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Make a reset inside Contacts the detection that leaving puts back
Contacts lends detection for the session and puts back the earlier state on leaving; a share link carries that earlier state. A reset in Visual is the user's choice, so it becomes both. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
63dc5756d5
commit
a1e7b2a394
4 files changed
+48
-1
No files matched your search
@@ -355,6 +355,20 @@ export class VisualSettings {
|
||||
this._syncShareState();
|
||||
}
|
||||
|
||||
/**
|
||||
* While Contacts holds detection, make the detection shown now the state
|
||||
* leaving Contacts puts back (and a share link carries): the user chose it,
|
||||
* as with Reset in Visual. Nothing changes outside Contacts.
|
||||
*/
|
||||
adoptDetectionAsRestore() {
|
||||
if (!this._contactsDetectionRestore) return;
|
||||
const state = this.getDetectionState();
|
||||
this._contactsDetectionRestore = {
|
||||
mode: state.detectionMode,
|
||||
densityPct: state.densityPct,
|
||||
};
|
||||
}
|
||||
|
||||
_setCockpitVision(mode, active, { revealParameters = false } = {}) {
|
||||
const next = active ? normalizeCockpitVisionMode(mode) : 'optical';
|
||||
if (!this.stages) return;
|
||||
|
||||
Reference in new issue
Block a user