From 74f3e5715acfece4e7c128bd3d3ce3706330eda2 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Wed, 5 Feb 2014 14:38:44 -0500 Subject: [PATCH] simplify gesture points --- ios/MBXViewController.mm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ios/MBXViewController.mm b/ios/MBXViewController.mm index 8ed1136ee..b03594324 100644 --- a/ios/MBXViewController.mm +++ b/ios/MBXViewController.mm @@ -150,21 +150,13 @@ class MBXMapView - (void)handleDoubleTapGesture:(UITapGestureRecognizer *)doubleTap { if (doubleTap.state == UIGestureRecognizerStateEnded) - { - CGPoint gesturePoint = [doubleTap locationInView:doubleTap.view]; - - mapView->map.scaleBy(2, gesturePoint.x, gesturePoint.y); - } + mapView->map.scaleBy(2, [doubleTap locationInView:doubleTap.view].x, [doubleTap locationInView:doubleTap.view].y, 0.5); } - (void)handleTwoFingerTapGesture:(UITapGestureRecognizer *)twoFingerTap { if (twoFingerTap.state == UIGestureRecognizerStateEnded) - { - CGPoint gesturePoint = [twoFingerTap locationInView:twoFingerTap.view]; - - mapView->map.scaleBy(0.5, gesturePoint.x, gesturePoint.y); - } + mapView->map.scaleBy(0.5, [twoFingerTap locationInView:twoFingerTap.view].x, [twoFingerTap locationInView:twoFingerTap.view].y, 0.5); } - (void)handleLongPressGesture:(UILongPressGestureRecognizer *)longPress