From 89a448ee836a3e48ac969051954505587ae3586e Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 2 Oct 2026 17:22:04 -0700 Subject: [PATCH] Do not apply a panel's first view twice The panel starts the app from the first view's link, which the app restores, following included. Sending the same view again once the app was ready flew the camera to it, which ended the follow and left cockpit view. The panel now sends only views that arrive while the app loads. --- src/app/globePanelRuntime.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/globePanelRuntime.js b/src/app/globePanelRuntime.js index cc93ba524..73e1c1a48 100644 --- a/src/app/globePanelRuntime.js +++ b/src/app/globePanelRuntime.js @@ -461,7 +461,7 @@ export function panelRuntime(config) { * Load God's Eye View into this page from the app's panel build, in * inline embed mode, starting at the first view as its link would. */ - async function startApp(url) { + async function startApp(url, view) { window.GEV_EMBED_INLINE = true; window.GEV_APP_BASE_URL = config.appBaseUrl; try { @@ -470,6 +470,9 @@ export function panelRuntime(config) { '', location.href.split('#')[0] + new URL(url).hash, ); + // The app restores this view from its link, following included, so + // it must not be applied again: flying there would end the follow. + if (queued === view) queued = null; } catch { // The view still arrives once the app is ready. } @@ -554,7 +557,7 @@ export function panelRuntime(config) { if (started) return; started = true; say("Loading God's Eye View…"); - startApp(url).catch((error) => + startApp(url, view).catch((error) => say(`God's Eye View could not load here: ${error?.message || error}.`), ); setTimeout(() => {