From 2f22518cdd180a29f474e23a8e0faac77012941e Mon Sep 17 00:00:00 2001 From: Kirill Zhdanovich Date: Fri, 1 Mar 2013 15:48:17 +0300 Subject: [PATCH] [iOS] Now recognisers work if user after scaling starts draging --- iphone/Maps/Classes/MapViewController.mm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index f5d2206965..2afd35afa2 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -593,16 +593,27 @@ { if (recognizer.state == UIGestureRecognizerStateChanged) { - if (startedScaling) - { - f.StopScale(ScaleEvent(p1.x, p1.y, p2.x, p2.y)); - startedScaling = NO; - } + if (startedScaling) + { + f.StopScale(ScaleEvent(p1.x, p1.y, p2.x, p2.y)); + CGPoint z = [self pointFromRecognizerWithScaleFactor:recognizer]; + f.StartDrag(DragEvent(z.x, z.y)); + startedScaling = NO; + lastRotateTime = 0; + } + else + { + [self handlePan:(UIPanGestureRecognizer *)recognizer]; + } } if (recognizer.state != UIGestureRecognizerStateEnded) { return; } + else if (!startedScaling) + { + [self handlePan:(UIPanGestureRecognizer *)recognizer]; + } } //Work of Scale Recognizer