Attach the shell to another globe without disposing it

StyleManager.attachScene/detachScene rebuild only the globe-bound parts (share restoration, visual settings, layer bindings, Cockpit, the celestial ring, the overlay host, detection, map-source and camera-orientation controls) and point navigation, location search, HUD, share link and the display bindings at the next globe. dispose() revokes input synchronously, detaches the scene and only then nulls the stores and unmounts the views. The radio tuner listens on the globe container, and an engine's persistent notice can be withdrawn.
This commit is contained in:
German Khokhlov committed 2026-11-03 18:02:46 +04:00
1 parent d1fdb9eb45
commit 061ed1b682
8 files changed
+693 -288

No files matched your search

+5 -1
View File
@@ -210,7 +210,11 @@ test('universal notice lifecycle clears on dispose and uses the one top-center l
const dispose = ui.slice(disposeStart, disposeEnd);
assert.match(dispose, /this\._feedback\.clearLoadingStatus\(\);/);
assert.match(dispose, /this\._shareRestoration\.destroy\(\)/);
// The globe-bound parts, share restoration included, go with the scene.
assert.match(dispose, /await this\.detachScene\(/);
const detachStart = ui.indexOf(' async detachScene({');
const detach = ui.slice(detachStart, ui.indexOf('\n }\n', detachStart));
assert.match(detach, /this\._shareRestoration\.destroy\(\)/);
assert.match(ShareRestoration.prototype.destroy.toString(), /this\._shareTrackingNoticeGeneration \+= 1;/);
assert.match(html, /<div id="global-loading-status" role="status" aria-live="polite" aria-atomic="true" hidden>/);
});