diff options
author | Lauren Budorick <lauren@mapbox.com> | 2018-05-04 15:58:47 -0700 |
---|---|---|
committer | Lauren Budorick <lauren@mapbox.com> | 2018-05-04 16:24:14 -0700 |
commit | 7e2697677314deb648f48be1d091a61bc11e731d (patch) | |
tree | a69b375ef7c289b1dbbd53a1ee5b1830ad95ee0f /platform/android | |
parent | 27b21363e62c105db0b040b4c5a5ef31170ebd30 (diff) | |
download | qtlocation-mapboxgl-7e2697677314deb648f48be1d091a61bc11e731d.tar.gz |
[core] Port expression spec changes
Ports https://github.com/mapbox/mapbox-gl-js/pull/6521: for the sake of gl-native this only requires tweak to code generation scripts.
Diffstat (limited to 'platform/android')
-rwxr-xr-x | platform/android/scripts/generate-style-code.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/android/scripts/generate-style-code.js b/platform/android/scripts/generate-style-code.js index 3b0363cc19..bfbdca3cc3 100755 --- a/platform/android/scripts/generate-style-code.js +++ b/platform/android/scripts/generate-style-code.js @@ -268,9 +268,13 @@ global.propertyValueDoc = function (property, value) { }; global.isDataDriven = function (property) { - return property['property-function'] === true; + return property['property-type'] === 'data-driven' || property['property-type'] === 'cross-faded-data-driven'; }; +global.isInterpolable = function(property) { + return property.expression && property.expression.interpolated; +} + global.isLightProperty = function (property) { return property['light-property'] === true; }; @@ -318,11 +322,11 @@ global.evaluatedType = function (property) { }; global.supportsZoomFunction = function (property) { - return property['zoom-function'] === true; + return property.expression && property.expression.parameters.indexOf('zoom') > -1; }; global.supportsPropertyFunction = function (property) { - return property['property-function'] === true; + return property['property-type'] === 'data-driven' || property['property-type'] === 'cross-faded-data-driven'; }; // Template processing // |