From b6ab4f5bd1f3f26a20590e0750936df516749319 Mon Sep 17 00:00:00 2001 From: Manjunath Paparaju Date: Mon, 16 Nov 2026 14:13:15 -0800 Subject: [PATCH] Show the Labels and 3D aircraft settings in Context's Properties tab While a layer they act on is on, the Visual panel's detection overlay and 3D aircraft controls move into their tab in Context, beside what they affect; Cockpit still takes them first, and they go back to Visual when the layer goes off. Co-authored-by: Sameh Khamis --- src/ui/views/panels/DisplayPanel.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ui/views/panels/DisplayPanel.vue b/src/ui/views/panels/DisplayPanel.vue index d45f98622..a0e9b8777 100644 --- a/src/ui/views/panels/DisplayPanel.vue +++ b/src/ui/views/panels/DisplayPanel.vue @@ -6,6 +6,7 @@ import { vPanelState } from '../../rail/panelState.js'; import { vClassToggle } from '../../rail/classToggle.js'; import PanelCollapseButton from '../../rail/PanelCollapseButton.vue'; import UiPanelEdge from '../../kit/UiPanelEdge.vue'; +import { availableTabs, tabTarget } from '../../contextLayerTabs.js'; import UiSegmented from '../../kit/UiSegmented.vue'; import UiSlider from '../../kit/UiSlider.js'; import { useDisplayStore } from '../../stores/display.js'; @@ -20,6 +21,11 @@ import VisualPresets from './VisualPresets.vue'; // Draw and Import live in UTILITIES (LayerPanelsView). const display = useDisplayStore(); const { view, models3d, parameters, cockpitPortal, groups, sky } = storeToRefs(display); +// Cockpit takes these controls first; otherwise, while a layer they act on is +// on, they move into that layer's tab in Context. +const inContext = (id) => availableTabs.value.some((tab) => tab.id === id); +const detectionTarget = computed(() => cockpitPortal.value?.detection ?? (inContext('labels') ? tabTarget('labels') : null)); +const modelsTarget = computed(() => cockpitPortal.value?.models3d ?? (inContext('aircraft') ? tabTarget('aircraft') : null)); // A control's change goes to its owner (DisplayBindings). const act = (name, ...args) => display.act(name, ...args); const pct = (value) => `${value}%`; @@ -122,7 +128,7 @@ const allocationOptions = computed(() => [ - +
▣ @@ -160,7 +166,7 @@ const allocationOptions = computed(() => [
- +