Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/iphone
diff options
context:
space:
mode:
authorKirill Zhdanovich <kzhdanovich@gmail.com>2013-03-01 16:48:17 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:51:31 +0300
commit2f22518cdd180a29f474e23a8e0faac77012941e (patch)
treed9eb63ec77fe8f2197d8710163631b8c33ad7d5c /iphone
parentc68e1b3ad3ffe2144150f0572536a28ffb1c5946 (diff)
[iOS] Now recognisers work if user after scaling starts draging
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Classes/MapViewController.mm21
1 files 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