Permalink
Browse files

Fixed a scrolling bug when using a paged scrolling strategy

  • Loading branch information...
1 parent cdfb75e commit 20e28fc98a9e89985b06fca8b28d6f2aa165153d @Bringo committed Feb 29, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 GMGridView/API/GMGridView.m
@@ -1418,12 +1418,12 @@ - (void)scrollToObjectAtIndex:(NSInteger)index animated:(BOOL)animated
CGSize pageSize = CGSizeMake(_scrollView.bounds.size.width - _scrollView.contentInset.left - _scrollView.contentInset.right,
_scrollView.bounds.size.height - _scrollView.contentInset.top - _scrollView.contentInset.bottom);
- while (originScroll.x + pageSize.width < origin.x)
+ while (originScroll.x + pageSize.width <= origin.x)
{
originScroll.x += pageSize.width;
}
- while (originScroll.y + pageSize.height < origin.y)
+ while (originScroll.y + pageSize.height <= origin.y)
{
originScroll.y += pageSize.height;
}

0 comments on commit 20e28fc

Please sign in to comment.