summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-02-07 08:50:37 -0800
committerMinh Nguyễn <mxn@1ec5.org>2018-02-07 08:50:37 -0800
commit1607181c0da1d8d2cc3b5dc10636ac4595d2c8e0 (patch)
treea86d56ad4c225ed9448299d7c63deb1146aa2775
parent1c20291cd666ea82999dfd94b5550bea9dfa2995 (diff)
downloadqtlocation-mapboxgl-1607181c0da1d8d2cc3b5dc10636ac4595d2c8e0.tar.gz
[ios, macos] Conditionalize function variable for heatmap-color
-rwxr-xr-xplatform/darwin/scripts/generate-style-code.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index ed7204d244..53a668d10b 100755
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -308,15 +308,15 @@ global.propertyDoc = function (propertyName, property, layerType, kind) {
doc += '* Predefined functions, including mathematical and string operators\n' +
'* Conditional expressions\n' +
'* Variable assignments and references to assigned variables\n';
+ const inputVariable = property.name === 'heatmap-color' ? '$heatmapDensity' : '$zoomLevel';
if (property["property-function"]) {
- doc += '* Interpolation and step functions applied to the `$zoomLevel` variable and/or feature attributes\n';
+ doc += `* Interpolation and step functions applied to the \`${inputVariable}\` variable and/or feature attributes\n`;
} else if (property.function === "interpolated") {
- const variable = property.name === 'heatmap-color' ? '$heatmapDensity' : '$zoomLevel';
- doc += `* Interpolation and step functions applied to the \`${variable}\` variable\n\n` +
+ 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 {
- doc += '* Step functions applied to the `$zoomLevel` variable\n\n' +
- 'This property does not support applying interpolation functions to the `$zoomLevel` variable or applying interpolation or step functions to feature attributes.';
+ doc += `* Step functions applied to the \`${inputVariable}\` variable\n\n` +
+ `This property does not support applying interpolation functions to the \`${inputVariable}\` variable or applying interpolation or step functions to feature attributes.`;
}
}
return doc;