Browse Source

Pull request #1371: fix

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '04420ce1392016317889bc1f2d59bad48eb28cfe':
  fix
es6
guy 4 years ago
parent
commit
7a7199e6b4
  1. 8
      src/base/list/virtuallist.js

8
src/base/list/virtuallist.js

@ -114,7 +114,8 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this.cache[i].destroyed = true; this.cache[i].destroyed = true;
} }
} }
var firstFragment = BI.Widget._renderEngine.createFragment(), lastFragment = BI.Widget._renderEngine.createFragment(); var firstFragment = BI.Widget._renderEngine.createFragment(),
lastFragment = BI.Widget._renderEngine.createFragment();
var currentFragment = firstFragment; var currentFragment = firstFragment;
for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) { for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) {
var index = this.cache[i].index; var index = this.cache[i].index;
@ -146,7 +147,10 @@ BI.VirtualList = BI.inherit(BI.Widget, {
} }
this.tree = BI.PrefixIntervalTree.empty(Math.ceil(o.items.length / o.blockSize)); this.tree = BI.PrefixIntervalTree.empty(Math.ceil(o.items.length / o.blockSize));
this._calculateBlocksToRender(); this._calculateBlocksToRender();
this.element.scrollTop(o.scrollTop); try {
this.element.scrollTop(o.scrollTop);
} catch (e) {
}
}, },
_clearChildren: function () { _clearChildren: function () {

Loading…
Cancel
Save