diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-11-05 15:28:26 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-11-06 11:06:53 -0800 |
commit | 17451418cc7cb359985185e4a0f5a7581c0d9a6b (patch) | |
tree | f4c4e26dd550e63340b8428f57c2f2f8f6ae8121 | |
parent | 10858ab382b006476d2c9b8f8f68910ec086068f (diff) | |
download | qtlocation-mapboxgl-17451418cc7cb359985185e4a0f5a7581c0d9a6b.tar.gz |
[core] Update after final frame of transition
The final frame is self-destructing – it destroys the frame and finish functions – so technically we’re no longer inTransition(). Yet there still needs to be an update after that final frame.
Also, avoid a redundant change notification on the last frame. (It would come too late, after the DidChange notification, anyhow.)
Fixes #2946.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/mbgl/map/map.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/map/transform.cpp | 5 |
3 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index fa9a6ff23f..1a5af40c9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Known issues: - The double-tap-drag gesture for zooming in and out is now consistent with the Google Maps SDK. ([#2153](https://github.com/mapbox/mapbox-gl-native/pull/2153)) - A new `MGLAnnotationImage.enabled` property allows you to disable touch events on individual annotations. ([#2501](https://github.com/mapbox/mapbox-gl-native/pull/2501)) - Fixed a rendering issue that caused one-way arrows along tile boundaries to point due east instead of in the direction of travel. ([#2530](https://github.com/mapbox/mapbox-gl-native/pull/2530)) +- Fixed an issue that prevented zoom level–dependent style properties from updating after zooming programmatically with animation. ([#2951](https://github.com/mapbox/mapbox-gl-native/pull/2951)) - Fixed a rendering issue with styles that use the `background-pattern` property. ([#2531](https://github.com/mapbox/mapbox-gl-native/pull/2531)) - Labels can now line wrap on hyphens and other punctuation. ([#2598](https://github.com/mapbox/mapbox-gl-native/pull/2598)) - A new delegate callback was added for observing taps to annotation callout views. ([#2596](https://github.com/mapbox/mapbox-gl-native/pull/2596)) diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index f4db160c27..bca8b1edee 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -82,7 +82,7 @@ void Map::renderSync() { // Triggers an asynchronous update, that eventually triggers a view // invalidation, causing renderSync to be called again if in transition. - if (transform->inTransition()) { + if (flags != Update::Nothing) { update(flags); } } diff --git a/src/mbgl/map/transform.cpp b/src/mbgl/map/transform.cpp index 87e86ea3e6..f0c5a136e0 100644 --- a/src/mbgl/map/transform.cpp +++ b/src/mbgl/map/transform.cpp @@ -275,7 +275,10 @@ void Transform::_easeTo(CameraOptions options, const double new_scale, const dou state.Cc = s / util::M2PI; state.angle = util::wrap(util::interpolate(startA, angle, t), -M_PI, M_PI); state.pitch = util::interpolate(startP, pitch, t); - view.notifyMapChange(MapChangeRegionIsChanging); + // At t = 1.0, a DidChangeAnimated notification should be sent from finish(). + if (t < 1.0) { + view.notifyMapChange(MapChangeRegionIsChanging); + } return update; }, [=] { |