diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-05-28 01:46:10 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-05-28 01:58:24 +1000 |
| commit | 14f20c9e4e27bf0e57b06c7251e17bef9ad10c67 (patch) | |
| tree | 577e3268610f3c6cf4ee9b47aac47bfddb49eb4c /src/App.vue | |
| parent | f86b30f37c07552c7d48bad03eb343dfc06c698a (diff) | |
Allow keeping overflown-root after settings/tut events
Avoided keeping an overflown-root on resize, as it can get quite laggy.
Diffstat (limited to 'src/App.vue')
| -rw-r--r-- | src/App.vue | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/App.vue b/src/App.vue index 3a5a733..9fda4de 100644 --- a/src/App.vue +++ b/src/App.vue @@ -304,6 +304,7 @@ export default defineComponent({ this.setLastFocused(null); LayoutNode.showDownward(layoutNode); this.activeRoot = layoutNode; + this.overflownRoot = false; this.updateAreaDims().then(() => this.relayoutWithCollapse()); }, // For tile-info events @@ -596,6 +597,7 @@ export default defineComponent({ const resizeDelay = 100; let handleResize = () => { this.uiOpts.scrollGap = getScrollBarWidth(); + this.overflownRoot = false; return this.updateAreaDims().then(() => this.relayoutWithCollapse()); }; let currentTime = new Date().getTime(); @@ -696,7 +698,11 @@ export default defineComponent({ } }, relayoutWithCollapse(secondPass = true){ - this.overflownRoot = false; + if (this.overflownRoot){ + tryLayout(this.activeRoot, [0,0], this.tileAreaDims, + {...this.lytOpts, layoutType: 'flex-sqr'}, {allowCollapse: false, layoutMap: this.layoutMap}); + return; + } tryLayout(this.activeRoot, [0,0], this.tileAreaDims, this.lytOpts, {allowCollapse: true, layoutMap: this.layoutMap}); if (secondPass){ |
