gmoledina / GMGridView

A performant Grid-View for iOS (iPhone/iPad) that allows sorting of views with gestures (the user can move the items with his finger to sort them) and pinching/rotating/panning gestures allow the user to play with the view and toggle from the cellview to a fullsize display.
MIT License
2.3k stars 512 forks source link

method rectForPoint with pagingEnabled bad offset calculation #169

Open jakubknejzlik opened 11 years ago

jakubknejzlik commented 11 years ago

Hi! I've discovered little bug and recently found fix for it:).

Example: I have grid view 2x2 and 5 items in it. If i scroll to second page (only half page) and rotate, the new position(originScroll) is calculated incorrectly.

Here's fix, that works for me:

line 1350-1351:

originScroll = CGPointMake(MIN(pageX * pageSize.width,self.contentSize.width-pageSize.width),MIN(pageY * pageSize.height,self.contentSize.height-pageSize.height));