mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 02:02:21 +00:00
Hand focus to a rail entry when a panel folds it away
- When F or a panel's collapse button folds a panel that holds the focus, the focus moves to that panel's visible rail entry. The same happens when opening Data Layers folds a peer panel that held it, and in Cockpit the focus moves to Contact's expand button when that card folds. - The `shownBy: 'active'` rail gate is gone: nothing removes `.active` from Data Layers any more, so a rail entry now follows `panel.hidden`. - CURRENT-STATE says what F does, and the panel catalog comment no longer says F toggles `.active`.
This commit is contained in:
1 parent
3a24768a2d
commit
c7df3c6798
9 files changed
+179
-40
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import PanelRailView from './PanelRailView.vue';
|
||||
import { PANEL_RAIL_HOST_CLASS, PANEL_RAIL_ITEMS } from './panelRailCatalog.js';
|
||||
import { PANEL_RAIL_HOST_CLASS } from './panelRailCatalog.js';
|
||||
import { usePanelStore } from './stores/panels.js';
|
||||
|
||||
/**
|
||||
@@ -71,7 +71,6 @@ export class PanelNavigation {
|
||||
? [...stack.children]
|
||||
.filter((panel) => panel.matches('[data-panel-id]'))
|
||||
.map((panel) => {
|
||||
const shownBy = PANEL_RAIL_ITEMS[panel.id]?.shownBy;
|
||||
return {
|
||||
id: panel.id,
|
||||
title:
|
||||
@@ -79,9 +78,7 @@ export class PanelNavigation {
|
||||
.querySelector('.panel-title, .pp-header-label')
|
||||
?.textContent.trim() || panel.id,
|
||||
open: !panel.classList.contains('collapsed'),
|
||||
available:
|
||||
!panel.hidden &&
|
||||
(!shownBy || panel.classList.contains(shownBy)),
|
||||
available: !panel.hidden,
|
||||
};
|
||||
})
|
||||
: [];
|
||||
|
||||
Reference in new issue
Block a user