diff options
Diffstat (limited to 'src/App.vue')
| -rw-r--r-- | src/App.vue | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/App.vue b/src/App.vue index f545e8f..4cc7aa0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -410,16 +410,16 @@ export default defineComponent({ let layoutNode = this.layoutMap.get(ancestorName)!; // If hidden, expand self/ancestor in ancestry-bar if (layoutNode.hidden){ - let visibleNode = layoutNode; - while (!this.detachedAncestors!.includes(visibleNode)){ - visibleNode = visibleNode.parent!; + let nodeInAncestryBar = layoutNode; + while (!this.detachedAncestors!.includes(nodeInAncestryBar)){ + nodeInAncestryBar = nodeInAncestryBar.parent!; } - if (!this.uiOpts.jumpToSearchedNode){ - this.onDetachedAncestorClick(visibleNode!); + if (!this.uiOpts.jumpToSearchedNode || nodeInAncestryBar.name == name){ + this.onDetachedAncestorClick(nodeInAncestryBar!); setTimeout(() => this.expandToNode(name), this.uiOpts.tileChgDuration); return; } else { - LayoutNode.showDownward(visibleNode); + LayoutNode.showDownward(nodeInAncestryBar); } } // Attempt tile-expand |
