Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
assign default height after assigning new sections
Browse files Browse the repository at this point in the history
also apply it to sections with value null
  • Loading branch information
bwindels committed Jan 28, 2019
1 parent eaf212d commit 14485b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resizer/distributors/roomsublist2.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ export class Layout {
if (Number.isFinite(availableHeight)) {
this._availableHeight = availableHeight;
}
this._sections = sections;
const totalHeight = this._getAvailableHeight();
this._sections.forEach((section, i) => {
if (!this._sectionHeights.hasOwnProperty(section.id)) {
if (!this._sectionHeights[section.id]) {
this._sectionHeights[section.id] = clamp(
totalHeight / this._sections.length,
this._getMinHeight(i),
this._getMaxHeight(i),
);
}
});
this._sections = sections;
this._applyNewSize();
}

Expand Down

0 comments on commit 14485b6

Please sign in to comment.