Fix issue #15: Dragonroll Frontend: Map Viewer adjustmentes

This commit is contained in:
Gitea OpenCode Agent
2026-10-14 12:35:05 +00:00
parent 67ca4b0210
commit 4a5b17c77c
12 changed files with 466 additions and 218 deletions

View File

@@ -2,11 +2,38 @@ import { ref } from 'vue';
const ShowContent = ref(false);
// What the campaign workspace shows where the notes live: the open notes, or the map the
// sidebar anchored on the note container. 'notes' | 'map'
const ActivePane = ref('notes');
// The map anchored on the note container (a campaign entry of the sidebar's maps section).
const AnchoredMap = ref(null);
function SetShowContent(value) {
ShowContent.value = value;
}
function SetActivePane(value) {
ActivePane.value = value;
}
// Anchoring shows the map where the open notes are; they stay open and come back on 'notes'.
function AnchorMap(map) {
AnchoredMap.value = map ?? null;
ActivePane.value = AnchoredMap.value ? 'map' : 'notes';
}
function ClearAnchoredMap() {
AnchoredMap.value = null;
if (ActivePane.value === 'map') ActivePane.value = 'notes';
}
export {
ShowContent,
SetShowContent
}
SetShowContent,
ActivePane,
AnchoredMap,
SetActivePane,
AnchorMap,
ClearAnchoredMap
}