Switch to FO pane on any label click in CP or SubObjects panes

This commit is contained in:
c0dev0id
2026-06-23 21:36:46 +02:00
parent 4c392927cf
commit c52b0bf9cf
3 changed files with 7 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ import { ObjectShort } from './ObjectShort.js';
// Shows sub-objects of the currently focused node — variations, bars, voices, etc.
export const PaneSubObjects = {
props: ['store'],
props: ['store', 'onFocusFO'],
setup(props) {
function focused() {
const fp = props.store.focusPath;
@@ -71,8 +71,8 @@ export const PaneSubObjects = {
typeTag: item.kind,
focused: props.store.focusPath.includes(item.node),
hasChildren: item.hasChildren ?? (item.kind !== 'bar' && item.kind !== 'voice'),
onFocus: () => props.store.pushFocus(item.node),
onDrillDown: () => props.store.pushFocus(item.node),
onFocus: () => { props.store.pushFocus(item.node); props.onFocusFO?.(); },
onDrillDown: () => { props.store.pushFocus(item.node); props.onFocusFO?.(); },
})
)),
]);