Browse Source

Pull request #204386: BI-116192 动态列表不可见状态下resize问题

Merge in DEC/fineui from ~WINDY/fineui:final/11.0 to final/11.0

* commit 'e3f8e33ef90afcfe5abd1f455122a20e5e7d50c0':
  BI-116192 动态列表不可见状态下resize问题
research/test
windy-许昊 2 years ago
parent
commit
d5db2bce64
  1. 3
      src/base/list/listview.js
  2. 4
      src/base/list/virtualgrouplist.js
  3. 4
      src/base/list/virtuallist.js

3
src/base/list/listview.js

@ -55,6 +55,9 @@ BI.ListView = BI.inherit(BI.Widget, {
var lastWidth = this.element.width(), var lastWidth = this.element.width(),
lastHeight = this.element.height(); lastHeight = this.element.height();
BI.ResizeDetector.addResizeListener(this, function () { BI.ResizeDetector.addResizeListener(this, function () {
if (!self.element.is(":visible")) {
return;
}
var width = self.element.width(), var width = self.element.width(),
height = self.element.height(); height = self.element.height();
if (width !== lastWidth || height !== lastHeight) { if (width !== lastWidth || height !== lastHeight) {

4
src/base/list/virtualgrouplist.js

@ -74,7 +74,9 @@ BI.VirtualGroupList = BI.inherit(BI.Widget, {
} }
}); });
BI.ResizeDetector.addResizeListener(this, function () { BI.ResizeDetector.addResizeListener(this, function () {
self._calculateBlocksToRender(); if (self.element.is(":visible")) {
self._calculateBlocksToRender();
}
}); });
}, },

4
src/base/list/virtuallist.js

@ -61,7 +61,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
self._calculateBlocksToRender(); self._calculateBlocksToRender();
}); });
BI.ResizeDetector.addResizeListener(this, function () { BI.ResizeDetector.addResizeListener(this, function () {
self._calculateBlocksToRender(); if (self.element.is(":visible")) {
self._calculateBlocksToRender();
}
}); });
}, },

Loading…
Cancel
Save