From ab5232d516519913b4f06a8b0925f7a9e553d658 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 19 May 2017 10:39:35 +0800 Subject: [PATCH] bug --- bi/base.js | 27 ++++----------------------- docs/base.js | 27 ++++----------------------- src/base/collection/collection.js | 3 ++- src/base/grid/grid.js | 3 ++- src/base/table/table.collection.js | 8 -------- src/base/table/table.grid.js | 13 ------------- 6 files changed, 12 insertions(+), 69 deletions(-) diff --git a/bi/base.js b/bi/base.js index 005c9fea9..4eb577a97 100644 --- a/bi/base.js +++ b/bi/base.js @@ -2777,6 +2777,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { _populate: function (items) { var o = this.options; + this._reRange(); if (items && items !== this.options.items) { this.options.items = items; this._calculateSizeAndPositionData(); @@ -2850,7 +2851,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { }, //重新计算children - reRange: function () { + _reRange: function () { this.renderRange = {}; }, @@ -14873,6 +14874,7 @@ BI.GridView = BI.inherit(BI.Widget, { _populate: function (items) { var self = this, o = this.options; + this._reRange(); if (items && items !== this.options.items) { this.options.items = items; } @@ -14961,7 +14963,7 @@ BI.GridView = BI.inherit(BI.Widget, { }, //重新计算children - reRange: function () { + _reRange: function () { this.renderRange = {}; }, @@ -28993,7 +28995,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, { return; } if (this._isNeedDigest === true) { - this._reRange(); this._digest(); } this._isNeedDigest = false; @@ -29091,13 +29092,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, { this.bottomRightCollection.restore(); }, - _reRange: function () { - this.topLeftCollection.reRange(); - this.topRightCollection.reRange(); - this.bottomLeftCollection.reRange(); - this.bottomRightCollection.reRange(); - }, - restore: function () { this._restore(); } @@ -29710,10 +29704,6 @@ BI.GridTable = BI.inherit(BI.Widget, { if (this._width <= 0 || this._height <= 0) { return; } - if (this._isNeedDigest === true) { - this._reRange(); - this._isNeedDigest = false; - } this._populateTable(); this._populateScrollbar(); }, @@ -29789,13 +29779,11 @@ BI.GridTable = BI.inherit(BI.Widget, { populate: function (items, header) { if (items && this.options.items !== items) { - this._isNeedDigest = true; this.options.items = items; this.items = this._getItems(); this._restore(); } if (header && this.options.header !== header) { - this._isNeedDigest = true; this.options.header = header; this.header = this._getHeader(); this._restore(); @@ -29810,13 +29798,6 @@ BI.GridTable = BI.inherit(BI.Widget, { this.bottomRightGrid.restore(); }, - _reRange: function () { - this.topLeftGrid.reRange(); - this.topRightGrid.reRange(); - this.bottomLeftGrid.reRange(); - this.bottomRightGrid.reRange(); - }, - restore: function () { this._restore(); } diff --git a/docs/base.js b/docs/base.js index 005c9fea9..4eb577a97 100644 --- a/docs/base.js +++ b/docs/base.js @@ -2777,6 +2777,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { _populate: function (items) { var o = this.options; + this._reRange(); if (items && items !== this.options.items) { this.options.items = items; this._calculateSizeAndPositionData(); @@ -2850,7 +2851,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { }, //重新计算children - reRange: function () { + _reRange: function () { this.renderRange = {}; }, @@ -14873,6 +14874,7 @@ BI.GridView = BI.inherit(BI.Widget, { _populate: function (items) { var self = this, o = this.options; + this._reRange(); if (items && items !== this.options.items) { this.options.items = items; } @@ -14961,7 +14963,7 @@ BI.GridView = BI.inherit(BI.Widget, { }, //重新计算children - reRange: function () { + _reRange: function () { this.renderRange = {}; }, @@ -28993,7 +28995,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, { return; } if (this._isNeedDigest === true) { - this._reRange(); this._digest(); } this._isNeedDigest = false; @@ -29091,13 +29092,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, { this.bottomRightCollection.restore(); }, - _reRange: function () { - this.topLeftCollection.reRange(); - this.topRightCollection.reRange(); - this.bottomLeftCollection.reRange(); - this.bottomRightCollection.reRange(); - }, - restore: function () { this._restore(); } @@ -29710,10 +29704,6 @@ BI.GridTable = BI.inherit(BI.Widget, { if (this._width <= 0 || this._height <= 0) { return; } - if (this._isNeedDigest === true) { - this._reRange(); - this._isNeedDigest = false; - } this._populateTable(); this._populateScrollbar(); }, @@ -29789,13 +29779,11 @@ BI.GridTable = BI.inherit(BI.Widget, { populate: function (items, header) { if (items && this.options.items !== items) { - this._isNeedDigest = true; this.options.items = items; this.items = this._getItems(); this._restore(); } if (header && this.options.header !== header) { - this._isNeedDigest = true; this.options.header = header; this.header = this._getHeader(); this._restore(); @@ -29810,13 +29798,6 @@ BI.GridTable = BI.inherit(BI.Widget, { this.bottomRightGrid.restore(); }, - _reRange: function () { - this.topLeftGrid.reRange(); - this.topRightGrid.reRange(); - this.bottomLeftGrid.reRange(); - this.bottomRightGrid.reRange(); - }, - restore: function () { this._restore(); } diff --git a/src/base/collection/collection.js b/src/base/collection/collection.js index 1b0320187..d359668a5 100644 --- a/src/base/collection/collection.js +++ b/src/base/collection/collection.js @@ -267,6 +267,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { _populate: function (items) { var o = this.options; + this._reRange(); if (items && items !== this.options.items) { this.options.items = items; this._calculateSizeAndPositionData(); @@ -340,7 +341,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { }, //重新计算children - reRange: function () { + _reRange: function () { this.renderRange = {}; }, diff --git a/src/base/grid/grid.js b/src/base/grid/grid.js index 92798e55b..c76f354c7 100644 --- a/src/base/grid/grid.js +++ b/src/base/grid/grid.js @@ -223,6 +223,7 @@ BI.GridView = BI.inherit(BI.Widget, { _populate: function (items) { var self = this, o = this.options; + this._reRange(); if (items && items !== this.options.items) { this.options.items = items; } @@ -311,7 +312,7 @@ BI.GridView = BI.inherit(BI.Widget, { }, //重新计算children - reRange: function () { + _reRange: function () { this.renderRange = {}; }, diff --git a/src/base/table/table.collection.js b/src/base/table/table.collection.js index dd31c1cc0..63da1b991 100644 --- a/src/base/table/table.collection.js +++ b/src/base/table/table.collection.js @@ -429,7 +429,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, { return; } if (this._isNeedDigest === true) { - this._reRange(); this._digest(); } this._isNeedDigest = false; @@ -527,13 +526,6 @@ BI.CollectionTable = BI.inherit(BI.Widget, { this.bottomRightCollection.restore(); }, - _reRange: function () { - this.topLeftCollection.reRange(); - this.topRightCollection.reRange(); - this.bottomLeftCollection.reRange(); - this.bottomRightCollection.reRange(); - }, - restore: function () { this._restore(); } diff --git a/src/base/table/table.grid.js b/src/base/table/table.grid.js index 074647924..7454fafd2 100644 --- a/src/base/table/table.grid.js +++ b/src/base/table/table.grid.js @@ -357,10 +357,6 @@ BI.GridTable = BI.inherit(BI.Widget, { if (this._width <= 0 || this._height <= 0) { return; } - if (this._isNeedDigest === true) { - this._reRange(); - this._isNeedDigest = false; - } this._populateTable(); this._populateScrollbar(); }, @@ -436,13 +432,11 @@ BI.GridTable = BI.inherit(BI.Widget, { populate: function (items, header) { if (items && this.options.items !== items) { - this._isNeedDigest = true; this.options.items = items; this.items = this._getItems(); this._restore(); } if (header && this.options.header !== header) { - this._isNeedDigest = true; this.options.header = header; this.header = this._getHeader(); this._restore(); @@ -457,13 +451,6 @@ BI.GridTable = BI.inherit(BI.Widget, { this.bottomRightGrid.restore(); }, - _reRange: function () { - this.topLeftGrid.reRange(); - this.topRightGrid.reRange(); - this.bottomLeftGrid.reRange(); - this.bottomRightGrid.reRange(); - }, - restore: function () { this._restore(); }