Browse Source

Merge pull request #1148 in VISUAL/fineui from ~FAY/fineui:master to master

* commit '19463fb2b08eed7932a27500134a463fb7273071':
  交换下顺序
  BI-52376 resize问题
es6
fay 5 years ago
parent
commit
5ec81cc778
  1. 10
      src/base/list/listview.js

10
src/base/list/listview.js

@ -45,8 +45,16 @@ BI.ListView = BI.inherit(BI.Widget, {
o.scrollTop = self.element.scrollTop(); o.scrollTop = self.element.scrollTop();
self._calculateBlocksToRender(); self._calculateBlocksToRender();
}); });
var lastWidth = this.element.width(),
lastHeight = this.element.height();
BI.ResizeDetector.addResizeListener(this, function () { BI.ResizeDetector.addResizeListener(this, function () {
self._calculateBlocksToRender(); var width = self.element.width(),
height = self.element.height();
if (width !== lastWidth || height !== lastHeight) {
lastWidth = width;
lastHeight = height;
self._calculateBlocksToRender();
}
}); });
}, },

Loading…
Cancel
Save