diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-05-22 20:29:20 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-05-22 20:29:20 +1000 |
| commit | f233d3aa56c3d506b881dea34537e4772dbabf30 (patch) | |
| tree | 3252464cc4b0de810d042290172330f7b3040141 /src | |
| parent | 703750ea5de00354c6bb807f95e8bd9685b3dddd (diff) | |
Hide more ancestors upon search layout-failure
Diffstat (limited to 'src')
| -rw-r--r-- | src/App.vue | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/App.vue b/src/App.vue index 79743ac..1dd0b93 100644 --- a/src/App.vue +++ b/src/App.vue @@ -384,13 +384,14 @@ export default defineComponent({ setTimeout(() => this.expandToNode(name), this.uiOpts.tileChgDuration); return; } - // Attempt expand-to-view on ancestor just below activeRoot + // Attempt expand-to-view on an ancestor if (layoutNode == this.activeRoot){ console.log('Screen too small to expand active root'); this.modeRunning = false; return; } - while (true){ + const MAX_ANCESTOR_DIST = 5; + for (let i = 0; i < MAX_ANCESTOR_DIST; i++){ if (layoutNode.parent! == this.activeRoot){ break; } |
