Skip to content

Commit 289f1b9

Browse files
committed
fix(ios): itemOverlap zIndex fix
1 parent aaaf7b1 commit 289f1b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/collectionview/index.ios.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,9 @@ class UICollectionViewFlowLayoutImpl extends UICollectionViewFlowLayout {
12421242
const attributes = attributesArray.objectAtIndex(index);
12431243
if (attributes.representedElementCategory === UICollectionElementCategory.Cell) {
12441244
const row = attributes.indexPath.row;
1245+
if (owner.itemOverlap) {
1246+
attributes.zIndex = row;
1247+
}
12451248
const itemOverlap = owner.itemOverlap(owner.getItemAtIndex(row), row);
12461249
const xPosition = attributes.center.x + Utils.layout.toDeviceIndependentPixels(Length.toDevicePixels(itemOverlap[1], 0) + Length.toDevicePixels(itemOverlap[2], 0)) * row;
12471250
const yPosition = attributes.center.y + Utils.layout.toDeviceIndependentPixels(Length.toDevicePixels(itemOverlap[0], 0) + Length.toDevicePixels(itemOverlap[2], 0)) * row;

0 commit comments

Comments
 (0)