Fix negative height request in WellGrid
When WellGrid had no child it was doing a division by zero, which screwed up the calculation for the height request and having it ask for a negative number. This commit fixes this by always requesting 0 in this case.
This commit is contained in:
parent
5a75b44f71
commit
4495f98dce
@ -686,6 +686,8 @@ WellGrid.prototype = {
|
|||||||
let columnsNatural;
|
let columnsNatural;
|
||||||
let i;
|
let i;
|
||||||
let children = this._getItemChildren();
|
let children = this._getItemChildren();
|
||||||
|
if (children.length == 0)
|
||||||
|
return [0, WELL_DEFAULT_COLUMNS, 0, 0];
|
||||||
let nColumns;
|
let nColumns;
|
||||||
if (children.length < WELL_DEFAULT_COLUMNS)
|
if (children.length < WELL_DEFAULT_COLUMNS)
|
||||||
nColumns = children.length;
|
nColumns = children.length;
|
||||||
|
Loading…
Reference in New Issue
Block a user