From 14485b60bebeda1f98c7143fa78a463d60fb24b7 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 28 Jan 2019 16:00:28 +0100 Subject: [PATCH] assign default height after assigning new sections also apply it to sections with value null --- src/resizer/distributors/roomsublist2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resizer/distributors/roomsublist2.js b/src/resizer/distributors/roomsublist2.js index 5d291e1516..8e9112ebb3 100644 --- a/src/resizer/distributors/roomsublist2.js +++ b/src/resizer/distributors/roomsublist2.js @@ -63,9 +63,10 @@ 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), @@ -73,7 +74,6 @@ export class Layout { ); } }); - this._sections = sections; this._applyNewSize(); }