diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-04-18 23:01:42 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-04-18 23:01:42 -0700 |
commit | 261b6161f2554520781d33183b8560613ef184ad (patch) | |
tree | a6b1111c20864f1a50ea06fe22ebe0a91cd79e2e /platform | |
parent | f80238577c5a42f2b65e0c4b5feb3bbac4243b3c (diff) | |
download | qtlocation-mapboxgl-261b6161f2554520781d33183b8560613ef184ad.tar.gz |
Cancel animations on touch down
Cancel any map animations as soon as a finger is set upon the screen.
Fixes #1258.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapView.mm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 5acf04ef79..1b50146a67 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -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; |