Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LNICoverFlowLayout/Classes/LNICoverFlowLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ open class LNICoverFlowLayout:UICollectionViewFlowLayout {
let prevItemRightEdge = center + halfWidth
let projectedLeftEdgeLocal = halfWidth * cos(maxRads) * kDistanceToProjectionPlane / (kDistanceToProjectionPlane + halfWidth * sin(maxRads))

return prevItemRightEdge - (self.coverDensity * self.itemSize.width) + projectedLeftEdgeLocal
return prevItemRightEdge - (self.coverDensity * self.itemSize.width) + projectedLeftEdgeLocal + minimumInteritemSpacing
}

fileprivate func maxXCenterForRow(_ row:Int)->CGFloat {
Expand All @@ -190,7 +190,7 @@ open class LNICoverFlowLayout:UICollectionViewFlowLayout {
let nextItemLeftEdge = center - halfWidth
let projectedRightEdgeLocal = fabs(halfWidth * cos(maxRads) * kDistanceToProjectionPlane / (-halfWidth * sin(maxRads) - kDistanceToProjectionPlane))

return nextItemLeftEdge + (self.coverDensity * self.itemSize.width) - projectedRightEdgeLocal
return nextItemLeftEdge + (self.coverDensity * self.itemSize.width) - projectedRightEdgeLocal - minimumInteritemSpacing
}

fileprivate func degreesToRad(_ degrees:CGFloat)->CGFloat {
Expand Down