diff options
author | Anand Thakker <anandthakker@users.noreply.github.com> | 2017-03-08 11:53:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-08 11:53:44 -0500 |
commit | bb846fd6cdff84e71741de9428a00137fd5f73a8 (patch) | |
tree | 915421863f2d6468ad537113566ae609ff0a94be /src | |
parent | f591421aaaf698c23ccff37a03d03c87eaa0d988 (diff) | |
download | qtlocation-mapboxgl-bb846fd6cdff84e71741de9428a00137fd5f73a8.tar.gz |
For data-driven paint setters, transition immediately to target value (#8306)
Closes #8237
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/style/paint_property.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/style/paint_property.hpp b/src/mbgl/style/paint_property.hpp index 1fa2390f33..599bbef1f4 100644 --- a/src/mbgl/style/paint_property.hpp +++ b/src/mbgl/style/paint_property.hpp @@ -51,6 +51,12 @@ public: // Transition from prior value is now complete. prior = {}; return finalValue; + } else if (value.isDataDriven()) { + // Transitions to data-driven properties are not supported. + // We snap immediately to the data-driven value so that, when we perform layout, + // we see the data-driven function and can use it to populate vertex buffers. + prior = {}; + return finalValue; } else if (now < begin) { // Transition hasn't started yet. return prior->get().evaluate(evaluator, now); |