Browse Source

无JIRA任务 grid布局populate空数组问题

es6
young 8 years ago
parent
commit
d7cf76b6eb
  1. 5
      bi/base.js
  2. 5
      docs/base.js
  3. 5
      src/base/grid/grid.js

5
bi/base.js

@ -14750,6 +14750,10 @@ BI.Grid = BI.inherit(BI.Widget, {
if (o.items.length > 0) {
this.columnCount = o.items[0].length;
this.rowCount = o.items.length;
} else {
this.rowCount = 0;
this.columnCount = 0;
}
this.container.setWidth(this.columnCount * o.estimatedColumnSize);
this.container.setHeight(this.rowCount * o.estimatedRowSize);
@ -14759,7 +14763,6 @@ BI.Grid = BI.inherit(BI.Widget, {
this._calculateChildrenToRender();
this.element.scrollTop(o.scrollTop);
this.element.scrollLeft(o.scrollLeft);
}
},
setScrollLeft: function (scrollLeft) {

5
docs/base.js

@ -14750,6 +14750,10 @@ BI.Grid = BI.inherit(BI.Widget, {
if (o.items.length > 0) {
this.columnCount = o.items[0].length;
this.rowCount = o.items.length;
} else {
this.rowCount = 0;
this.columnCount = 0;
}
this.container.setWidth(this.columnCount * o.estimatedColumnSize);
this.container.setHeight(this.rowCount * o.estimatedRowSize);
@ -14759,7 +14763,6 @@ BI.Grid = BI.inherit(BI.Widget, {
this._calculateChildrenToRender();
this.element.scrollTop(o.scrollTop);
this.element.scrollLeft(o.scrollLeft);
}
},
setScrollLeft: function (scrollLeft) {

5
src/base/grid/grid.js

@ -195,6 +195,10 @@ BI.Grid = BI.inherit(BI.Widget, {
if (o.items.length > 0) {
this.columnCount = o.items[0].length;
this.rowCount = o.items.length;
} else {
this.rowCount = 0;
this.columnCount = 0;
}
this.container.setWidth(this.columnCount * o.estimatedColumnSize);
this.container.setHeight(this.rowCount * o.estimatedRowSize);
@ -204,7 +208,6 @@ BI.Grid = BI.inherit(BI.Widget, {
this._calculateChildrenToRender();
this.element.scrollTop(o.scrollTop);
this.element.scrollLeft(o.scrollLeft);
}
},
setScrollLeft: function (scrollLeft) {

Loading…
Cancel
Save