Browse Source

BI-52376 resize问题

es6
Fay 5 years ago
parent
commit
7459d14da7
  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();
self._calculateBlocksToRender();
});
var lastWidth = this.element.width(),
lastHeight = this.element.height();
BI.ResizeDetector.addResizeListener(this, function () {
self._calculateBlocksToRender();
var width = self.element.width(),
height = self.element.height();
if (width !== lastWidth || height !== lastHeight) {
self._calculateBlocksToRender();
lastWidth = width;
lastHeight = height;
}
});
},

Loading…
Cancel
Save