Authored by Justin R. Miller

fixes #166: callout fixes for shapes & circles

@@ -70,6 +70,8 @@ @@ -70,6 +70,8 @@
70 circlePath = NULL; 70 circlePath = NULL;
71 [self updateCirclePathAnimated:NO]; 71 [self updateCirclePathAnimated:NO];
72 72
  73 + self.masksToBounds = NO;
  74 +
73 return self; 75 return self;
74 } 76 }
75 77
@@ -1472,6 +1472,22 @@ @@ -1472,6 +1472,22 @@
1472 else 1472 else
1473 { 1473 {
1474 [self correctPositionOfAllAnnotationsIncludingInvisibles:NO animated:(_mapScrollViewIsZooming && !_mapScrollView.zooming)]; 1474 [self correctPositionOfAllAnnotationsIncludingInvisibles:NO animated:(_mapScrollViewIsZooming && !_mapScrollView.zooming)];
  1475 +
  1476 + if (_currentAnnotation && ! [_currentAnnotation isKindOfClass:[RMMarker class]])
  1477 + {
  1478 + // adjust shape annotation callouts for frame changes during zoom
  1479 + //
  1480 + _currentCallout.delegate = nil;
  1481 +
  1482 + [_currentCallout presentCalloutFromRect:_currentAnnotation.layer.bounds
  1483 + inLayer:_currentAnnotation.layer
  1484 + constrainedToLayer:self.layer
  1485 + permittedArrowDirections:SMCalloutArrowDirectionDown
  1486 + animated:NO];
  1487 +
  1488 + _currentCallout.delegate = self;
  1489 + }
  1490 +
1475 _lastZoom = _zoom; 1491 _lastZoom = _zoom;
1476 } 1492 }
1477 1493
@@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
85 previousBounds = CGRectZero; 85 previousBounds = CGRectZero;
86 lastScale = 0.0; 86 lastScale = 0.0;
87 87
88 - self.masksToBounds = YES; 88 + self.masksToBounds = NO;
89 89
90 scaleLineWidth = NO; 90 scaleLineWidth = NO;
91 scaleLineDash = NO; 91 scaleLineDash = NO;