summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLAnnotationView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/src/MGLAnnotationView.mm')
-rw-r--r--platform/ios/src/MGLAnnotationView.mm14
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/ios/src/MGLAnnotationView.mm b/platform/ios/src/MGLAnnotationView.mm
index d2243bdf23..5b105cde72 100644
--- a/platform/ios/src/MGLAnnotationView.mm
+++ b/platform/ios/src/MGLAnnotationView.mm
@@ -96,7 +96,7 @@
{
center.x += _centerOffset.dx;
center.y += _centerOffset.dy;
-
+
super.center = center;
[self updateScaleTransformForViewingDistance];
}
@@ -122,14 +122,14 @@
// or 75%. The range goes from a maximum of 100% to 0% as the view moves from the top to the bottom
// along the y axis of its superview.
CGFloat maxScaleReduction = 1.0 - self.center.y / superviewHeight;
-
+
// The pitch intensity represents how much the map view is actually pitched compared to
// what is possible. The value will range from 0% (not pitched at all) to 100% (pitched as much
// as the map view will allow). The map view's maximum pitch is defined in `mbgl::util::PITCH_MAX`.
// Since it is possible for the map view to report a pitch less than 0 due to the nature of
// how the gesture information is captured, the value is guarded with MAX.
CGFloat pitchIntensity = MAX(self.mapView.camera.pitch, 0) / MGLDegreesFromRadians(mbgl::util::PITCH_MAX);
-
+
// The pitch adjusted scale is the inverse proportion of the maximum possible scale reduction
// multiplied by the pitch intensity. For example, if the maximum scale reduction is 75% and the
// map view is 50% pitched then the annotation view should be reduced by 37.5% (.75 * .5). The
@@ -154,7 +154,7 @@
[self willChangeValueForKey:@"draggable"];
_draggable = draggable;
[self didChangeValueForKey:@"draggable"];
-
+
if (draggable)
{
[self enableDrag];
@@ -174,7 +174,7 @@
[self addGestureRecognizer:recognizer];
_longPressRecognizer = recognizer;
}
-
+
if (!_panGestureRecognizer)
{
UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)];
@@ -232,7 +232,7 @@
[self willChangeValueForKey:@"dragState"];
_dragState = dragState;
[self didChangeValueForKey:@"dragState"];
-
+
if (dragState == MGLAnnotationViewDragStateStarting)
{
[self.mapView.calloutViewForSelectedAnnotation dismissCalloutAnimated:animated];
@@ -260,7 +260,7 @@
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
BOOL isDragging = self.dragState == MGLAnnotationViewDragStateDragging;
-
+
if (gestureRecognizer == _panGestureRecognizer && !(isDragging))
{
return NO;