Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Cancel animations on touch down
Browse files Browse the repository at this point in the history
Cancel any map animations as soon as a finger is set upon the screen.

Fixes #1258.
  • Loading branch information
1ec5 committed Apr 19, 2015
1 parent f802385 commit 261b616
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions platform/ios/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,15 @@ - (void)handleCompassTapGesture:(id)sender

#pragma clang diagnostic pop

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
(void)touches;
(void)event;
mbglMap->cancelTransitions();
mbglMap->setGestureInProgress(false);
self.animatingGesture = NO;
}

- (void)handlePanGesture:(UIPanGestureRecognizer *)pan
{
if ( ! self.isScrollEnabled) return;
Expand Down

0 comments on commit 261b616

Please sign in to comment.