|
|
|
@ -130,9 +130,9 @@ BI.GridView = BI.inherit(BI.Widget, {
|
|
|
|
|
var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange(width, scrollLeft); |
|
|
|
|
var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange(height, scrollTop); |
|
|
|
|
|
|
|
|
|
if (BI.isEmpty(visibleColumnIndices) || BI.isEmpty(visibleRowIndices)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var renderedCells = [], renderedKeys = {}, renderedWidgets = {}; |
|
|
|
|
// 没有可见的单元格就干掉所有渲染过的
|
|
|
|
|
if (!BI.isEmpty(visibleColumnIndices) && !BI.isEmpty(visibleRowIndices)) { |
|
|
|
|
var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment(width, scrollLeft); |
|
|
|
|
var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment(height, scrollTop); |
|
|
|
|
|
|
|
|
@ -164,7 +164,6 @@ BI.GridView = BI.inherit(BI.Widget, {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var renderedCells = [], renderedKeys = {}, renderedWidgets = {}; |
|
|
|
|
var minX = this._getMaxScrollLeft(), minY = this._getMaxScrollTop(), maxX = 0, maxY = 0; |
|
|
|
|
var count = 0; |
|
|
|
|
for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) { |
|
|
|
@ -225,6 +224,7 @@ BI.GridView = BI.inherit(BI.Widget, {
|
|
|
|
|
count++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 已存在的, 需要添加的和需要删除的
|
|
|
|
|
var existSet = {}, addSet = {}, deleteArray = []; |
|
|
|
|
BI.each(renderedKeys, function (i, key) { |
|
|
|
|