From 7e2697677314deb648f48be1d091a61bc11e731d Mon Sep 17 00:00:00 2001 From: Lauren Budorick Date: Fri, 4 May 2018 15:58:47 -0700 Subject: [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. --- platform/android/scripts/generate-style-code.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'platform/android') 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 // -- cgit v1.2.1