|
|
@ -262,22 +262,17 @@ BI.GridView = BI.inherit(BI.Widget, { |
|
|
|
this.options.items = items; |
|
|
|
this.options.items = items; |
|
|
|
this._calculateSizeAndPositionData(); |
|
|
|
this._calculateSizeAndPositionData(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (o.items.length > 0) { |
|
|
|
this.container.setWidth(this._getContainerWidth()); |
|
|
|
this.container.setWidth(this._getContainerWidth()); |
|
|
|
this.container.setHeight(this._getContainerHeight()); |
|
|
|
this.container.setHeight(this._getContainerHeight()); |
|
|
|
|
|
|
|
|
|
|
|
// 元素未挂载时不能设置scrollTop
|
|
|
|
// 元素未挂载时不能设置scrollTop
|
|
|
|
this._debounceRelease(); |
|
|
|
this._debounceRelease(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
this.element.scrollTop(o.scrollTop); |
|
|
|
this.element.scrollTop(o.scrollTop); |
|
|
|
this.element.scrollLeft(o.scrollLeft); |
|
|
|
this.element.scrollLeft(o.scrollLeft); |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this._calculateChildrenToRender(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.container.setWidth("auto"); |
|
|
|
|
|
|
|
this.container.setHeight("auto"); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this._calculateChildrenToRender(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setScrollLeft: function (scrollLeft) { |
|
|
|
setScrollLeft: function (scrollLeft) { |
|
|
|