diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-06-30 17:41:25 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-06-30 17:41:25 +0200 |
commit | a6f7696feb466aeeab59d205b4f0b41e04cf9b60 (patch) | |
tree | 23c97fbe0a95785ff158a2ed21250283775d821c /src/style/style.cpp | |
parent | 18d898fae70681fba8cc31d73b581c360557746c (diff) | |
download | qtlocation-mapboxgl-a6f7696feb466aeeab59d205b4f0b41e04cf9b60.tar.gz |
add interpolation
Diffstat (limited to 'src/style/style.cpp')
-rw-r--r-- | src/style/style.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/style/style.cpp b/src/style/style.cpp index a08e77ac01..71d37b8dda 100644 --- a/src/style/style.cpp +++ b/src/style/style.cpp @@ -3,6 +3,7 @@ #include <llmr/style/style_parser.hpp> #include <llmr/style/style_bucket.hpp> #include <llmr/util/constants.hpp> +#include <llmr/util/time.hpp> #include <csscolorparser/csscolorparser.hpp> #include <rapidjson/document.h> @@ -55,7 +56,7 @@ void Style::updateProperties(float z, timestamp t) { } void Style::setDefaultTransitionDuration(uint16_t duration_milliseconds) { - defaultTransition.duration = duration_milliseconds; + defaultTransition.duration = duration_milliseconds * 1_millisecond; } const std::vector<std::string> &Style::getAppliedClasses() const { @@ -81,6 +82,16 @@ void Style::updateClasses() { } } +bool Style::hasTransitions() const { + if (layers) { + if (layers->hasTransitions()) { + return true; + } + } + return false; +} + + void Style::loadJSON(const uint8_t *const data) { uv::writelock lock(mtx); |