Plugin Studio: a shell in a tab learns its address depth
Each pane's profile-config now carries addressDepth (1 below Studio while Studio owns the address), so a nested shell such as the Research Gallery or Posterverse writes its own tab as ?subtab= at that depth instead of losing it.
This commit is contained in:
parent
00f7d349eb
commit
b1e86c0973
1 changed files with 4 additions and 1 deletions
|
|
@ -225,7 +225,7 @@ import StudioTree from './src/StudioTree.vue'
|
|||
import { LANGUAGES, loadLocale, saveLocale, getLanguage, normaliseLocale } from '@map/layouts/app-wrapper-material/languages.js'
|
||||
import { publishMapToken, clearMapToken } from '@map/composables/useSharedMapToken.js'
|
||||
import { loadScriptOnce, whenTagDefined } from '@map/utils/embedScript.js'
|
||||
import { readViewKeys, writeViewKeys, onAddressChange, urlOwnerOf, commitUrl, ownAddress } from '@map/composables/useViewAddress.js'
|
||||
import { readViewKeys, writeViewKeys, onAddressChange, urlOwnerOf, commitUrl, ownAddress, depthOf } from '@map/composables/useViewAddress.js'
|
||||
|
||||
// The reader's own map token / token-service URL. localStorage only: never written into the build,
|
||||
// never sent anywhere but Mapbox (the token) or the URL the reader typed (the service).
|
||||
|
|
@ -909,6 +909,9 @@ export default defineComponent({
|
|||
if (tokenUrl) pc.tokenUrl = tokenUrl
|
||||
if (this.effectiveProvider) pc.provider = this.effectiveProvider
|
||||
if (this.base) pc.treeBase = this.base
|
||||
// A shell in a pane (the Research Gallery, Posterverse) writes its own tab one level below Studio's: ?subtab=,
|
||||
// at this depth. Nothing else reads it.
|
||||
pc.addressDepth = urlOwnerOf(this.cfg) ? 1 : depthOf(this.cfg) + 1
|
||||
return pc
|
||||
},
|
||||
setLocale(code) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue