mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Move Visual to the left rail and let panels sit at the screen edge
The left rail holds Data Layers, Utilities, Authoring and Visual; the right rail holds Context, CCTV and Street Level. A button in each panel header moves that side's panels to the screen edge, with the rail as a row above them, and scrolling at a screen edge steps through a rail's panels. An open right panel starts just under the HUD readouts, and Context and CCTV take the column's full height. The right rail stays level with the left column's top whichever left panel is open, in both layouts. Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
1 parent
f0a8b1193a
commit
7ee047961b
16 files changed
+999
-12
No files matched your search
@@ -1,5 +1,6 @@
|
||||
<script setup>
|
||||
import { vClassToggle } from '../rail/classToggle.js';
|
||||
import UiPanelEdge from './UiPanelEdge.vue';
|
||||
import UiPanelToggle from './UiPanelToggle.vue';
|
||||
|
||||
// Core's panel, with a name, title, slots and v-model:collapsed. It draws Core's panel markup
|
||||
@@ -57,6 +58,7 @@ const emit = defineEmits(['update:collapsed']);
|
||||
<slot name="badge" />
|
||||
<span class="panel-divider"></span>
|
||||
<slot name="actions" />
|
||||
<UiPanelEdge v-if="props.collapsible" />
|
||||
<UiPanelToggle
|
||||
v-if="props.collapsible"
|
||||
:target="props.id"
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<script setup>
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { t } from '../../i18n/index.js';
|
||||
import { panelEdge, panelSide, togglePanelEdge } from '../panelEdge.js';
|
||||
|
||||
// A panel header's edge switch: it slides this side's panels over their rail
|
||||
// to the screen edge, and back. The side comes from the column the panel is in.
|
||||
const button = ref(null);
|
||||
const side = ref('left');
|
||||
const on = computed(() => panelEdge.value[side.value]);
|
||||
function toggle() {
|
||||
side.value = panelSide(button.value);
|
||||
togglePanelEdge(side.value);
|
||||
}
|
||||
function sync() {
|
||||
side.value = panelSide(button.value);
|
||||
}
|
||||
onMounted(sync);
|
||||
const icon = computed(() => (side.value === 'right' ? 'align_horizontal_right' : 'align_horizontal_left'));
|
||||
const label = computed(() =>
|
||||
on.value ? t('Move panels back beside the rail') : t('Move panels over the rail, to the edge'),
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button
|
||||
ref="button"
|
||||
type="button"
|
||||
class="ui-panel-edge"
|
||||
:aria-pressed="String(on)"
|
||||
:aria-label="label"
|
||||
:title="label"
|
||||
@pointerenter="sync"
|
||||
@focus="sync"
|
||||
@click="toggle"
|
||||
>
|
||||
<span class="material-symbols-outlined" aria-hidden="true">{{ icon }}</span>
|
||||
</button>
|
||||
</template>
|
||||
Reference in new issue
Block a user