diff options
Diffstat (limited to 'platform/android/scripts/generate-style-code.js')
-rwxr-xr-x | platform/android/scripts/generate-style-code.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/platform/android/scripts/generate-style-code.js b/platform/android/scripts/generate-style-code.js index 3b0363cc19..fd0f316157 100755 --- a/platform/android/scripts/generate-style-code.js +++ b/platform/android/scripts/generate-style-code.js @@ -29,6 +29,9 @@ var layers = Object.keys(spec.layer.type.values).map((type) => { }, []); const paintProperties = Object.keys(spec[`paint_${type}`]).reduce((memo, name) => { + // not yet implemented + if (name === 'line-gradient') return memo; + spec[`paint_${type}`][name].name = name; memo.push(spec[`paint_${type}`][name]); return memo; @@ -268,9 +271,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 +325,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 // |