From c83aa2093620d7e4693b10156d5fb952ce8c5f09 Mon Sep 17 00:00:00 2001 From: Kira Date: Fri, 23 Apr 2021 11:23:51 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/collection/collection.js | 5 +---- src/core/structure/sectionManager.js | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/base/collection/collection.js b/src/base/collection/collection.js index 09b8f9de0..3cb3b6721 100644 --- a/src/base/collection/collection.js +++ b/src/base/collection/collection.js @@ -156,9 +156,6 @@ BI.CollectionView = BI.inherit(BI.Widget, { border[offset] = 0; } }; - var lastDatum = BI.last(BI.sortBy(this._sectionManager.getAllCellMetadata(), function (index, child) { - return (child.x + child.width + child.y + child.height); - })); for (var i = 0, len = childrenToDisplay.length; i < len; i++) { var datum = childrenToDisplay[i]; var index = this.renderedKeys[datum.index] && this.renderedKeys[datum.index][1]; @@ -185,7 +182,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { width: datum.width, height: datum.height }, o.items[datum.index], { - cls: (o.items[datum.index].cls || "") + " collection-cell" + (datum.y === 0 ? " first-row" : "") + (datum.x === 0 ? " first-col" : "") + ((datum.height + datum.y) === (lastDatum.height + lastDatum.y) ? " last-row" : "") + ((datum.width + datum.x) === (lastDatum.width + lastDatum.x) ? " last-col" : ""), + cls: (o.items[datum.index].cls || "") + " collection-cell" + (datum.y === 0 ? " first-row" : "") + (datum.x === 0 ? " first-col" : ""), _left: datum.x, _top: datum.y })); diff --git a/src/core/structure/sectionManager.js b/src/core/structure/sectionManager.js index 314fbb4ab..ee0692072 100644 --- a/src/core/structure/sectionManager.js +++ b/src/core/structure/sectionManager.js @@ -46,10 +46,6 @@ }); }, - getAllCellMetadata: function () { - return this._cellMetadata; - }, - getCellMetadata: function (index) { return this._cellMetadata[index]; },