mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08: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
@ -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 New Issue
Block a user