From d833174d68460934f1cf5acf5d95501b274f1f57 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 28 Jan 2019 16:29:34 +0100 Subject: [PATCH] floor default section height --- src/resizer/distributors/roomsublist2.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/resizer/distributors/roomsublist2.js b/src/resizer/distributors/roomsublist2.js index 3888396a97..bd74cf1080 100644 --- a/src/resizer/distributors/roomsublist2.js +++ b/src/resizer/distributors/roomsublist2.js @@ -81,10 +81,11 @@ export class Layout { this._sections = sections; const totalHeight = this._getAvailableHeight(); + const defaultHeight = Math.floor(totalHeight / this._sections.length); this._sections.forEach((section, i) => { if (!this._sectionHeights[section.id]) { this._sectionHeights[section.id] = clamp( - totalHeight / this._sections.length, + defaultHeight, this._getMinHeight(i), this._getMaxHeight(i), );