From a14f12572e6a85921ffd70fb48aa00126973b7a7 Mon Sep 17 00:00:00 2001 From: "Eon S. Jeon" Date: Sun, 5 Jan 2020 10:21:50 +0900 Subject: [PATCH] take account of master size when adjusting TCL --- src/layouts/threecolumnlayout.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/threecolumnlayout.ts b/src/layouts/threecolumnlayout.ts index f466db9..af834d5 100644 --- a/src/layouts/threecolumnlayout.ts +++ b/src/layouts/threecolumnlayout.ts @@ -38,7 +38,7 @@ class ThreeColumnLayout implements ILayout { if (basisIndex < 0) return; - if (tiles.length === 2) { + if (tiles.length === this.masterSize + 1) { this.masterRatio = LayoutUtils.adjustAreaHalfWeights( area, this.masterRatio, @@ -46,7 +46,7 @@ class ThreeColumnLayout implements ILayout { basisIndex, delta, true); - } else if (tiles.length >= 3) { + } else if (tiles.length > this.masterSize + 1) { let basisGroup; if (basisIndex < this.masterSize) basisGroup = 1; /* master */