summaryrefslogtreecommitdiff
path: root/src/mbgl/style/paint_property.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-01-17 11:48:37 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-01-17 15:18:14 -0600
commit531a1c3070a098b5b31082c0500f0a3ce6a500bb (patch)
treedc01f3f1b164fc564624d498aea02b6c42576cd8 /src/mbgl/style/paint_property.hpp
parentb04e11b5ca377e288b9ad27406603e4e1076a375 (diff)
downloadqtlocation-mapboxgl-531a1c3070a098b5b31082c0500f0a3ce6a500bb.tar.gz
[core] Fix calculation of delayed transitions
Diffstat (limited to 'src/mbgl/style/paint_property.hpp')
-rw-r--r--src/mbgl/style/paint_property.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mbgl/style/paint_property.hpp b/src/mbgl/style/paint_property.hpp
index 15df2a77c7..7b56f6415d 100644
--- a/src/mbgl/style/paint_property.hpp
+++ b/src/mbgl/style/paint_property.hpp
@@ -45,6 +45,9 @@ public:
// Transition from prior value is now complete.
prior = {};
return finalValue;
+ } else if (parameters.now < begin) {
+ // Transition hasn't started yet.
+ return prior->get().evaluate(parameters, defaultValue);
} else {
// Interpolate between recursively-calculated prior value and final.
float t = std::chrono::duration<float>(parameters.now - begin) / (end - begin);