refs #34: don't decelerate pan for low velocity

This commit is contained in:
Justin R. Miller
2014-02-06 16:27:54 -05:00
parent a95f0a8621
commit 29744cfa5a

View File

@@ -150,6 +150,9 @@ class MBXMapView
}
else if (pan.state == UIGestureRecognizerStateEnded)
{
if ([pan velocityInView:pan.view].x < 50 && [pan velocityInView:pan.view].y < 50)
return;
CGPoint finalCenter = CGPointMake(self.center.x + (0.1 * [pan velocityInView:pan.view].x),
self.center.y + (0.1 * [pan velocityInView:pan.view].y));