From 8c05f6207a3ce1e1024e259b0c1e72694542b60c Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Sat, 3 Oct 2026 06:29:51 +0000 Subject: [PATCH] Posterverse: a nested plugin's view inside a tab reaches the address The shell owns the address for the views inside its tabs too: a nested composite's ?pane= / ?place= choice is recorded through the shared helper, only while this page owns its address, never as a tab switch, and the event stops at the shell. --- plugin-designs/posterverse/posterverse.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin-designs/posterverse/posterverse.vue b/plugin-designs/posterverse/posterverse.vue index 39d7c95e7..3ee203f79 100644 --- a/plugin-designs/posterverse/posterverse.vue +++ b/plugin-designs/posterverse/posterverse.vue @@ -74,7 +74,7 @@ import BackToTopButton from '@map/components/BackToTopButton.vue' import ShellLanguageMenu from '@map/components/ShellLanguageMenu.vue' import { saveLocale } from '@map/layouts/app-wrapper-material/languages.js' import { loadScriptOnce, whenTagDefined } from '@map/utils/embedScript.js' -import { readViewKeys, writeViewKeys, onAddressChange, urlOwnerOf } from '@map/composables/useViewAddress.js' +import { readViewKeys, writeViewKeys, onAddressChange, urlOwnerOf, ownAddress } from '@map/composables/useViewAddress.js' import { translate, LOCALES } from './src/strings.js' import { SECTIONS, TABS, resolveTabs } from './src/tabs.js' @@ -233,6 +233,9 @@ export default defineComponent({ const want = this.requestedTab() const known = !want || this.tabs.some((t) => t.id === want) this.select(this.initialIndex(), { firstPaint: true, fromHistory: !known }) + // A nested plugin's choice inside a tab (?pane=, ?place=) reaches the address through the owner: recorded + // only while this page owns its address, never a tab switch, and the event stops here. + this._offOwn = ownAddress(this.$el, () => urlOwnerOf(this.cfg)) // Back / Forward re-apply the tab from the address and never write (writing would lose Forward). this._offAddress = onAddressChange(({ tab }) => { const i = this.tabs.findIndex((t) => t.id === tab) @@ -243,6 +246,7 @@ export default defineComponent({ beforeUnmount() { if (this._langObs) { this._langObs.disconnect(); this._langObs = null } if (this._offAddress) { this._offAddress(); this._offAddress = null } + if (this._offOwn) { this._offOwn(); this._offOwn = null } }, methods: { tr(key, params) { return translate(this.uiLocale, key, params) },