Various fixes

This commit is contained in:
Ilya Laktyushin
2023-02-21 20:07:36 +04:00
parent 1e6c6d6091
commit f8ab3d037e
13 changed files with 107 additions and 59 deletions

View File

@@ -492,7 +492,7 @@ open class GridNode: GridNodeScroller, UIScrollViewDelegate {
let effectiveWidth = gridLayout.size.width - itemInsets.left - itemInsets.right
let itemsInRow = Int(effectiveWidth / defaultItemSize.width)
let itemsInRow = max(1, Int(effectiveWidth / defaultItemSize.width))
let itemsInRowWidth = CGFloat(itemsInRow) * defaultItemSize.width
let remainingWidth = max(0.0, effectiveWidth - itemsInRowWidth)