aboutsummaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-05-26 13:31:33 +1000
committerTerry Truong <terry06890@gmail.com>2022-05-26 13:31:33 +1000
commit0ad314aef43b1b10cacc577ebacd1f697016d00a (patch)
tree60ee1d84515c915aefd4220b6d4fe3e86cc43f3e /src/App.vue
parent07397961bfb113bd9c03883f2b24e6d287f989ca (diff)
Fix bug with searching-for-tile in ancestry-bar
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue12
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