guy 8 years ago
parent
commit
ab5232d516
  1. 27
      bi/base.js
  2. 27
      docs/base.js
  3. 3
      src/base/collection/collection.js
  4. 3
      src/base/grid/grid.js
  5. 8
      src/base/table/table.collection.js
  6. 13
      src/base/table/table.grid.js

27
bi/base.js

@ -2777,6 +2777,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
_populate: function (items) { _populate: function (items) {
var o = this.options; var o = this.options;
this._reRange();
if (items && items !== this.options.items) { if (items && items !== this.options.items) {
this.options.items = items; this.options.items = items;
this._calculateSizeAndPositionData(); this._calculateSizeAndPositionData();
@ -2850,7 +2851,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}, },
//重新计算children //重新计算children
reRange: function () { _reRange: function () {
this.renderRange = {}; this.renderRange = {};
}, },
@ -14873,6 +14874,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_populate: function (items) { _populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
this._reRange();
if (items && items !== this.options.items) { if (items && items !== this.options.items) {
this.options.items = items; this.options.items = items;
} }
@ -14961,7 +14963,7 @@ BI.GridView = BI.inherit(BI.Widget, {
}, },
//重新计算children //重新计算children
reRange: function () { _reRange: function () {
this.renderRange = {}; this.renderRange = {};
}, },
@ -28993,7 +28995,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
return; return;
} }
if (this._isNeedDigest === true) { if (this._isNeedDigest === true) {
this._reRange();
this._digest(); this._digest();
} }
this._isNeedDigest = false; this._isNeedDigest = false;
@ -29091,13 +29092,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
this.bottomRightCollection.restore(); this.bottomRightCollection.restore();
}, },
_reRange: function () {
this.topLeftCollection.reRange();
this.topRightCollection.reRange();
this.bottomLeftCollection.reRange();
this.bottomRightCollection.reRange();
},
restore: function () { restore: function () {
this._restore(); this._restore();
} }
@ -29710,10 +29704,6 @@ BI.GridTable = BI.inherit(BI.Widget, {
if (this._width <= 0 || this._height <= 0) { if (this._width <= 0 || this._height <= 0) {
return; return;
} }
if (this._isNeedDigest === true) {
this._reRange();
this._isNeedDigest = false;
}
this._populateTable(); this._populateTable();
this._populateScrollbar(); this._populateScrollbar();
}, },
@ -29789,13 +29779,11 @@ BI.GridTable = BI.inherit(BI.Widget, {
populate: function (items, header) { populate: function (items, header) {
if (items && this.options.items !== items) { if (items && this.options.items !== items) {
this._isNeedDigest = true;
this.options.items = items; this.options.items = items;
this.items = this._getItems(); this.items = this._getItems();
this._restore(); this._restore();
} }
if (header && this.options.header !== header) { if (header && this.options.header !== header) {
this._isNeedDigest = true;
this.options.header = header; this.options.header = header;
this.header = this._getHeader(); this.header = this._getHeader();
this._restore(); this._restore();
@ -29810,13 +29798,6 @@ BI.GridTable = BI.inherit(BI.Widget, {
this.bottomRightGrid.restore(); this.bottomRightGrid.restore();
}, },
_reRange: function () {
this.topLeftGrid.reRange();
this.topRightGrid.reRange();
this.bottomLeftGrid.reRange();
this.bottomRightGrid.reRange();
},
restore: function () { restore: function () {
this._restore(); this._restore();
} }

27
docs/base.js

@ -2777,6 +2777,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
_populate: function (items) { _populate: function (items) {
var o = this.options; var o = this.options;
this._reRange();
if (items && items !== this.options.items) { if (items && items !== this.options.items) {
this.options.items = items; this.options.items = items;
this._calculateSizeAndPositionData(); this._calculateSizeAndPositionData();
@ -2850,7 +2851,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}, },
//重新计算children //重新计算children
reRange: function () { _reRange: function () {
this.renderRange = {}; this.renderRange = {};
}, },
@ -14873,6 +14874,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_populate: function (items) { _populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
this._reRange();
if (items && items !== this.options.items) { if (items && items !== this.options.items) {
this.options.items = items; this.options.items = items;
} }
@ -14961,7 +14963,7 @@ BI.GridView = BI.inherit(BI.Widget, {
}, },
//重新计算children //重新计算children
reRange: function () { _reRange: function () {
this.renderRange = {}; this.renderRange = {};
}, },
@ -28993,7 +28995,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
return; return;
} }
if (this._isNeedDigest === true) { if (this._isNeedDigest === true) {
this._reRange();
this._digest(); this._digest();
} }
this._isNeedDigest = false; this._isNeedDigest = false;
@ -29091,13 +29092,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
this.bottomRightCollection.restore(); this.bottomRightCollection.restore();
}, },
_reRange: function () {
this.topLeftCollection.reRange();
this.topRightCollection.reRange();
this.bottomLeftCollection.reRange();
this.bottomRightCollection.reRange();
},
restore: function () { restore: function () {
this._restore(); this._restore();
} }
@ -29710,10 +29704,6 @@ BI.GridTable = BI.inherit(BI.Widget, {
if (this._width <= 0 || this._height <= 0) { if (this._width <= 0 || this._height <= 0) {
return; return;
} }
if (this._isNeedDigest === true) {
this._reRange();
this._isNeedDigest = false;
}
this._populateTable(); this._populateTable();
this._populateScrollbar(); this._populateScrollbar();
}, },
@ -29789,13 +29779,11 @@ BI.GridTable = BI.inherit(BI.Widget, {
populate: function (items, header) { populate: function (items, header) {
if (items && this.options.items !== items) { if (items && this.options.items !== items) {
this._isNeedDigest = true;
this.options.items = items; this.options.items = items;
this.items = this._getItems(); this.items = this._getItems();
this._restore(); this._restore();
} }
if (header && this.options.header !== header) { if (header && this.options.header !== header) {
this._isNeedDigest = true;
this.options.header = header; this.options.header = header;
this.header = this._getHeader(); this.header = this._getHeader();
this._restore(); this._restore();
@ -29810,13 +29798,6 @@ BI.GridTable = BI.inherit(BI.Widget, {
this.bottomRightGrid.restore(); this.bottomRightGrid.restore();
}, },
_reRange: function () {
this.topLeftGrid.reRange();
this.topRightGrid.reRange();
this.bottomLeftGrid.reRange();
this.bottomRightGrid.reRange();
},
restore: function () { restore: function () {
this._restore(); this._restore();
} }

3
src/base/collection/collection.js

@ -267,6 +267,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
_populate: function (items) { _populate: function (items) {
var o = this.options; var o = this.options;
this._reRange();
if (items && items !== this.options.items) { if (items && items !== this.options.items) {
this.options.items = items; this.options.items = items;
this._calculateSizeAndPositionData(); this._calculateSizeAndPositionData();
@ -340,7 +341,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
}, },
//重新计算children //重新计算children
reRange: function () { _reRange: function () {
this.renderRange = {}; this.renderRange = {};
}, },

3
src/base/grid/grid.js

@ -223,6 +223,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_populate: function (items) { _populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
this._reRange();
if (items && items !== this.options.items) { if (items && items !== this.options.items) {
this.options.items = items; this.options.items = items;
} }
@ -311,7 +312,7 @@ BI.GridView = BI.inherit(BI.Widget, {
}, },
//重新计算children //重新计算children
reRange: function () { _reRange: function () {
this.renderRange = {}; this.renderRange = {};
}, },

8
src/base/table/table.collection.js

@ -429,7 +429,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
return; return;
} }
if (this._isNeedDigest === true) { if (this._isNeedDigest === true) {
this._reRange();
this._digest(); this._digest();
} }
this._isNeedDigest = false; this._isNeedDigest = false;
@ -527,13 +526,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
this.bottomRightCollection.restore(); this.bottomRightCollection.restore();
}, },
_reRange: function () {
this.topLeftCollection.reRange();
this.topRightCollection.reRange();
this.bottomLeftCollection.reRange();
this.bottomRightCollection.reRange();
},
restore: function () { restore: function () {
this._restore(); this._restore();
} }

13
src/base/table/table.grid.js

@ -357,10 +357,6 @@ BI.GridTable = BI.inherit(BI.Widget, {
if (this._width <= 0 || this._height <= 0) { if (this._width <= 0 || this._height <= 0) {
return; return;
} }
if (this._isNeedDigest === true) {
this._reRange();
this._isNeedDigest = false;
}
this._populateTable(); this._populateTable();
this._populateScrollbar(); this._populateScrollbar();
}, },
@ -436,13 +432,11 @@ BI.GridTable = BI.inherit(BI.Widget, {
populate: function (items, header) { populate: function (items, header) {
if (items && this.options.items !== items) { if (items && this.options.items !== items) {
this._isNeedDigest = true;
this.options.items = items; this.options.items = items;
this.items = this._getItems(); this.items = this._getItems();
this._restore(); this._restore();
} }
if (header && this.options.header !== header) { if (header && this.options.header !== header) {
this._isNeedDigest = true;
this.options.header = header; this.options.header = header;
this.header = this._getHeader(); this.header = this._getHeader();
this._restore(); this._restore();
@ -457,13 +451,6 @@ BI.GridTable = BI.inherit(BI.Widget, {
this.bottomRightGrid.restore(); this.bottomRightGrid.restore();
}, },
_reRange: function () {
this.topLeftGrid.reRange();
this.topRightGrid.reRange();
this.bottomLeftGrid.reRange();
this.bottomRightGrid.reRange();
},
restore: function () { restore: function () {
this._restore(); this._restore();
} }

Loading…
Cancel
Save