From 282efac8623ce0a4b6ac1072a05798610e9b8707 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 2 Oct 2026 12:12:10 -0700 Subject: [PATCH] Start the panel's app at the first view instead of the default place --- src/tools/globePanel.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/tools/globePanel.js b/src/tools/globePanel.js index 219fc27db..a3412baaa 100644 --- a/src/tools/globePanel.js +++ b/src/tools/globePanel.js @@ -221,9 +221,16 @@ function panelHtml(appOrigin) { * styles and markup are copied in, and its scripts run here with the app * in inline embed mode. */ - async function startApp() { + async function startApp(url) { window.GEV_EMBED_INLINE = true; redirectRequests(); + // Start at the first view, as its link would, instead of the default + // place; the app reads the view from this page's address. + try { + history.replaceState(null, '', location.href.split('#')[0] + new URL(url).hash); + } catch { + // The view still arrives once the app is ready. + } const response = await fetch(APP_ORIGIN + '/?embed=1'); if (!response.ok) throw new Error('the app answered ' + response.status); const page = new DOMParser().parseFromString(await response.text(), 'text/html'); @@ -256,7 +263,7 @@ function panelHtml(appOrigin) { if (started) return; started = true; status.textContent = "Loading God's Eye View…"; - startApp().catch((error) => { + startApp(url).catch((error) => { status.textContent = "God's Eye View could not load here: " + (error && error.message) + '.'; });