From 4209790a0c1737bc9cbf7df2bdcedc541b715dad Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Thu, 7 Jul 2022 20:22:28 +1000 Subject: Fix corner-squished retained-overflow on resize-to-larger --- src/App.vue | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/App.vue b/src/App.vue index f8c986e..1c4b74b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -977,18 +977,15 @@ export default defineComponent({ }, // For relayout relayoutWithCollapse(secondPass = true): boolean { - let success; if (this.overflownRoot){ - success = tryLayout(this.activeRoot, this.tileAreaDims, - {...this.lytOpts, layoutType: 'sqr-overflow'}, {allowCollapse: false, layoutMap: this.layoutMap}); - } else { + this.overflownRoot = false; + } + let success = tryLayout(this.activeRoot, this.tileAreaDims, this.lytOpts, + {allowCollapse: true, layoutMap: this.layoutMap}); + if (secondPass){ + // Relayout again, which can help allocate remaining tiles 'evenly' success = tryLayout(this.activeRoot, this.tileAreaDims, this.lytOpts, - {allowCollapse: true, layoutMap: this.layoutMap}); - if (secondPass){ - // Relayout again, which can help allocate remaining tiles 'evenly' - success = tryLayout(this.activeRoot, this.tileAreaDims, this.lytOpts, - {allowCollapse: false, layoutMap: this.layoutMap}); - } + {allowCollapse: false, layoutMap: this.layoutMap}); } return success; }, -- cgit v1.2.3