Skip to content

Commit

Permalink
Merge pull request #15944 from MaSch0212/issue-15943
Browse files Browse the repository at this point in the history
fix(splitter): minSizes not working as expected
  • Loading branch information
cetincakiroglu authored Jul 4, 2024
2 parents 0957e5f + fd1ed3c commit ddd0018
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/components/splitter/splitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ddd0018

Please sign in to comment.