mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
If maxNumberOfRows == 0 (the default), ignore maxNumberOfRows
This commit is contained in:
@@ -544,7 +544,10 @@ var HORIZONTAL_MARGIN = 2;
|
||||
itemSize.width = MIN(maxItemSizeWidth, width);
|
||||
}
|
||||
|
||||
numberOfRows = MAX(1.0 , MIN(CEIL(itemsCount / numberOfColumns), _maxNumberOfRows));
|
||||
numberOfRows = CEIL(itemsCount / numberOfColumns);
|
||||
|
||||
if (_maxNumberOfRows > 0)
|
||||
numberOfRows = MIN(numberOfRows, _maxNumberOfRows);
|
||||
|
||||
height = MAX(height, numberOfRows * (_minItemSize.height + _verticalMargin));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user