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

Commit 261b616

Browse files
committed
Cancel animations on touch down
Cancel any map animations as soon as a finger is set upon the screen. Fixes #1258.
1 parent f802385 commit 261b616

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

platform/ios/MGLMapView.mm

+9
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,15 @@ - (void)handleCompassTapGesture:(id)sender
647647

648648
#pragma clang diagnostic pop
649649

650+
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
651+
{
652+
(void)touches;
653+
(void)event;
654+
mbglMap->cancelTransitions();
655+
mbglMap->setGestureInProgress(false);
656+
self.animatingGesture = NO;
657+
}
658+
650659
- (void)handlePanGesture:(UIPanGestureRecognizer *)pan
651660
{
652661
if ( ! self.isScrollEnabled) return;

0 commit comments

Comments
 (0)