Skip to content

Commit

Permalink
Fixed neilang#37.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfurrow committed Jun 17, 2014
1 parent 97ed5bd commit c08ace4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions NAMapKit/NAMapView.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,12 @@ - (void)centerOnPoint:(CGPoint)point animated:(BOOL)animate

- (CGPoint)zoomRelativePoint:(CGPoint)point
{
CGFloat x = (self.contentSize.width / self.originalSize.width) * point.x;
CGFloat y = (self.contentSize.height / self.originalSize.height) * point.y;
CGFloat x = point.x;
CGFloat y = point.y;
if (fabsf(x) > 0 && fabsf(x) > 0) {
x = (self.contentSize.width / self.originalSize.width) * point.x;
y = (self.contentSize.height / self.originalSize.height) * point.y;
}
return CGPointMake(round(x), round(y));
}

Expand Down

0 comments on commit c08ace4

Please sign in to comment.