From fd1ed3c650ad411dc086fe288eff5f0c491a7ffb Mon Sep 17 00:00:00 2001 From: Marc Schmidt Date: Tue, 2 Jul 2024 16:24:22 +0200 Subject: [PATCH] fix(splitter): minSizes not working as expected Closes: #15943 --- src/app/components/splitter/splitter.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/components/splitter/splitter.ts b/src/app/components/splitter/splitter.ts index 2f81b158534..9a8eb9ac3c2 100755 --- a/src/app/components/splitter/splitter.ts +++ b/src/app/components/splitter/splitter.ts @@ -394,11 +394,13 @@ export class Splitter { } validateResize(newPrevPanelSize: number, newNextPanelSize: number) { - if (this.minSizes.length >= 1 && this.minSizes[0] && this.minSizes[0] > newPrevPanelSize) { + const prevPanelIndex = this.prevPanelIndex; + if (this.minSizes.length > prevPanelIndex && this.minSizes[prevPanelIndex] && this.minSizes[prevPanelIndex] > newPrevPanelSize) { return false; } - if (this.minSizes.length > 1 && this.minSizes[1] && this.minSizes[1] > newNextPanelSize) { + const nextPanelIndex = this.prevPanelIndex + 1; + if (this.minSizes.length > nextPanelIndex && this.minSizes[nextPanelIndex] && this.minSizes[nextPanelIndex] > newNextPanelSize) { return false; }