mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
assign default height after assigning new sections
also apply it to sections with value null
This commit is contained in:
parent
eaf212dd89
commit
14485b60be
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue