diff options
author | Lauren Budorick <lauren@mapbox.com> | 2018-04-16 17:38:53 -0700 |
---|---|---|
committer | Lauren Budorick <lauren@mapbox.com> | 2018-04-16 17:38:53 -0700 |
commit | cfd97e5ceaa7b88d591bdb730ae1e9b70dcaa5f5 (patch) | |
tree | 781f03674488d8a5cc1e8388d5b85c9a0766bb0c /platform/darwin/scripts/generate-style-code.js | |
parent | 8b10bb38c0a7d6e0a1225e185acde5ec8a604bdc (diff) | |
download | qtlocation-mapboxgl-cfd97e5ceaa7b88d591bdb730ae1e9b70dcaa5f5.tar.gz |
Bump gl-js pin: ignore line-gradient properties + shaders, use new expression style-spec taxonomyupstream/expression-spec
Diffstat (limited to 'platform/darwin/scripts/generate-style-code.js')
-rwxr-xr-x | platform/darwin/scripts/generate-style-code.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index 53a668d10b..b074286223 100755 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -309,9 +309,9 @@ global.propertyDoc = function (propertyName, property, layerType, kind) { '* Conditional expressions\n' + '* Variable assignments and references to assigned variables\n'; const inputVariable = property.name === 'heatmap-color' ? '$heatmapDensity' : '$zoomLevel'; - if (property["property-function"]) { + if (isDataDriven(property)) { doc += `* Interpolation and step functions applied to the \`${inputVariable}\` variable and/or feature attributes\n`; - } else if (property.function === "interpolated") { + } else if (property.expression && property.expression.interpolated) { doc += `* Interpolation and step functions applied to the \`${inputVariable}\` variable\n\n` + 'This property does not support applying interpolation or step functions to feature attributes.'; } else { @@ -322,6 +322,10 @@ global.propertyDoc = function (propertyName, property, layerType, kind) { return doc; }; +global.isDataDriven = function (property) { + return property['property-type'] === 'data-driven' || property['property-type'] === 'cross-faded-data-driven'; +}; + global.propertyReqs = function (property, propertiesByName, type) { return 'This property is only applied to the style if ' + property.requires.map(function (req) { if (typeof req === 'string') { @@ -633,6 +637,9 @@ const layers = _(spec.layer.type.values).map((value, layerType) => { }, []); const paintProperties = Object.keys(spec[`paint_${layerType}`]).reduce((memo, name) => { + // not yet implemented + if (name === 'line-gradient') return memo; + spec[`paint_${layerType}`][name].name = name; memo.push(spec[`paint_${layerType}`][name]); return memo; |