Cancel animations on touch down

Cancel any map animations as soon as a finger is set upon the screen.

Fixes #1258.
This commit is contained in:
Minh Nguyễn
2015-04-18 23:01:42 -07:00
parent f80238577c
commit 261b6161f2

View File

@@ -647,6 +647,15 @@ mbgl::DefaultFileSource *mbglFileSource = nullptr;
#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;