-
Notifications
You must be signed in to change notification settings - Fork 1.3k
MGLMapView viewport methods should cancel animations #2313
Comments
This would probably help #1975 (comment). |
To be clear: the goal here is to avoid any sort of stale viewport changes to occur after applying another viewport change. |
Just to confirm, while testing #2204, that this is an issue with |
@incanus do you have an idea of how much work this is? The last good version for me was pre2, which seems to also contain some crashing bugs under iOS 9. I'm blocked on releasing an iOS 9 compatible version of my app at the moment. |
@adam-mapbox, #2321 has been merged, but it doesn’t seem to be testing this scenario:
However, to adequately test whether setting a coordinate cancels other animations, we need to perform (ii) after the animation in (2) runs to completion. This test doesn’t account for the possibility that the animation in (2) continues running after (3) is done, clobbering (i). |
Coalescing willChange/didChange notifications means keeping track of how many gestures are currently in progress; a boolean isn’t enough to track this state. This change refactors the gesture recognizers, making them more consistent with each other and more consistent in the case where more than one of them has fired. It also explicitly cancels transitions before all programmatic viewport-modifying methods, since mbgl only does so when animating. Fixes #2313, fixes #2379, fixes #3062.
Coalescing willChange/didChange notifications means keeping track of how many gestures are currently in progress; a boolean isn’t enough to track this state. This change refactors the gesture recognizers, making them more consistent with each other and more consistent in the case where more than one of them has fired. It also explicitly cancels transitions before all programmatic viewport-modifying methods, since mbgl only does so when animating. Fixes #2313, fixes #2379, fixes #3062.
Per #2296, methods like
-[MGLMapView setCenterCoordinate:zoomLevel:]
should callmbgl::Map::cancelTransitions()
, just like the gesture recognizers do./cc @incanus
The text was updated successfully, but these errors were encountered: