From 402f2c594f028df8d4b1bfde7d5388dd40b7f379 Mon Sep 17 00:00:00 2001 From: Kira Date: Fri, 23 Apr 2021 10:19:05 +0800 Subject: [PATCH] =?UTF-8?q?JSY-4371=20feat:=20=E6=8F=90=E4=BE=9B=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E8=A1=8C=E6=9C=80=E5=90=8E=E4=B8=80=E5=88=97?= =?UTF-8?q?=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/collection/collection.js | 2 +- src/core/structure/sectionManager.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/base/collection/collection.js b/src/base/collection/collection.js index 6ef7ed813..09b8f9de0 100644 --- a/src/base/collection/collection.js +++ b/src/base/collection/collection.js @@ -156,7 +156,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { border[offset] = 0; } }; - var lastDatum = BI.last(BI.sortBy(childrenToDisplay, function (index, child) { + 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++) { diff --git a/src/core/structure/sectionManager.js b/src/core/structure/sectionManager.js index ee0692072..314fbb4ab 100644 --- a/src/core/structure/sectionManager.js +++ b/src/core/structure/sectionManager.js @@ -46,6 +46,10 @@ }); }, + getAllCellMetadata: function () { + return this._cellMetadata; + }, + getCellMetadata: function (index) { return this._cellMetadata[index]; },