mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
feat(app): a host names the layers a bare address starts with
createApplicationControls takes startLayers, the layer ids that turn on when the address carries no link (none by default). They restore through the passive start-up path, so they are never written as the user's own choice, and a link's own layers always win.
This commit is contained in:
1 parent
e02f6c6e39
commit
ca98ed1919
6 files changed
+66
-1
No files matched your search
@@ -103,6 +103,7 @@ export class LayerStateCoordinator {
|
||||
shareLayerState = null,
|
||||
allowLocalState = true,
|
||||
shareCreatedAtMs = null,
|
||||
startLayerIds = [],
|
||||
} = {}) {
|
||||
if (this._destroyed)
|
||||
throw new Error('Layer-state coordinator is destroyed');
|
||||
@@ -125,7 +126,13 @@ export class LayerStateCoordinator {
|
||||
selected = this._normalize(stored);
|
||||
this._source = 'local';
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (!selected && startLayerIds.length) {
|
||||
// The layers the application starts with when nothing names any:
|
||||
// restored passively, so they are never written as the user's choice.
|
||||
selected = this._normalize({ enabledLayerIds: startLayerIds });
|
||||
this._source = 'start';
|
||||
} else if (!selected && !allowLocalState) {
|
||||
// A valid historical camera/style share with no v2 layer payload keeps
|
||||
// the exact legacy default-layer behavior. It must not inherit an
|
||||
// unrelated recipient's saved local layer preferences.
|
||||
|
||||
Reference in new issue
Block a user