Skip to content
Browse files

Fixed minor size bug (edge case), changed < to <=

Thanks to Vanni for reporting the issue.
  • Loading branch information...
1 parent 3a9c753 commit b38f66b2fc7a03e8088fd1ef0bd6618025c13f76 @gmoledina committed Dec 22, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 GMGridView/API/GMGridViewLayoutStrategies.m
View
4 GMGridView/API/GMGridViewLayoutStrategies.m
@@ -155,7 +155,7 @@ - (void)rebaseWithItemCount:(NSInteger)count insideOfBounds:(CGRect)bounds
_numberOfItemsPerRow = 1;
- while ((self.numberOfItemsPerRow + 1) * (self.itemSize.width + self.itemSpacing) - self.itemSpacing < actualBounds.size.width)
+ while ((self.numberOfItemsPerRow + 1) * (self.itemSize.width + self.itemSpacing) - self.itemSpacing <= actualBounds.size.width)
{
_numberOfItemsPerRow++;
}
@@ -271,7 +271,7 @@ - (void)rebaseWithItemCount:(NSInteger)count insideOfBounds:(CGRect)bounds
_numberOfItemsPerColumn = 1;
- while ((_numberOfItemsPerColumn + 1) * (self.itemSize.height + self.itemSpacing) - self.itemSpacing < actualBounds.size.height)
+ while ((_numberOfItemsPerColumn + 1) * (self.itemSize.height + self.itemSpacing) - self.itemSpacing <= actualBounds.size.height)
{
_numberOfItemsPerColumn++;
}

0 comments on commit b38f66b

Please sign in to comment.
Something went wrong with that request. Please try again.