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

Commit 1745141

Browse files
committed
[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.
1 parent 10858ab commit 1745141

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Known issues:
2929
- 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))
3030
- A new `MGLAnnotationImage.enabled` property allows you to disable touch events on individual annotations. ([#2501](https://github.com/mapbox/mapbox-gl-native/pull/2501))
3131
- 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))
32+
- 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))
3233
- Fixed a rendering issue with styles that use the `background-pattern` property. ([#2531](https://github.com/mapbox/mapbox-gl-native/pull/2531))
3334
- Labels can now line wrap on hyphens and other punctuation. ([#2598](https://github.com/mapbox/mapbox-gl-native/pull/2598))
3435
- A new delegate callback was added for observing taps to annotation callout views. ([#2596](https://github.com/mapbox/mapbox-gl-native/pull/2596))

src/mbgl/map/map.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void Map::renderSync() {
8282

8383
// Triggers an asynchronous update, that eventually triggers a view
8484
// invalidation, causing renderSync to be called again if in transition.
85-
if (transform->inTransition()) {
85+
if (flags != Update::Nothing) {
8686
update(flags);
8787
}
8888
}

src/mbgl/map/transform.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,10 @@ void Transform::_easeTo(CameraOptions options, const double new_scale, const dou
275275
state.Cc = s / util::M2PI;
276276
state.angle = util::wrap(util::interpolate(startA, angle, t), -M_PI, M_PI);
277277
state.pitch = util::interpolate(startP, pitch, t);
278-
view.notifyMapChange(MapChangeRegionIsChanging);
278+
// At t = 1.0, a DidChangeAnimated notification should be sent from finish().
279+
if (t < 1.0) {
280+
view.notifyMapChange(MapChangeRegionIsChanging);
281+
}
279282
return update;
280283
},
281284
[=] {

0 commit comments

Comments
 (0)