summaryrefslogtreecommitdiff
path: root/platform/darwin/scripts/generate-style-code.js
diff options
context:
space:
mode:
authorFabian Guerra <fabian.guerra@mapbox.com>2018-02-15 11:54:51 -0500
committerFabian Guerra <fabian.guerra@mapbox.com>2018-02-15 11:54:51 -0500
commit903e7989ec3438a605bafbf5938de38cdb868e4a (patch)
treea2f8ba01fd8bf41503396605b993f9e38b77e131 /platform/darwin/scripts/generate-style-code.js
parentc83dc310aa656132638a66e65ba8aa274b5e969f (diff)
parent82de856c94bbc090ba30186011610da5e233e277 (diff)
downloadqtlocation-mapboxgl-903e7989ec3438a605bafbf5938de38cdb868e4a.tar.gz
Merge branch 'master' into release-boba
# Conflicts: # platform/android/CHANGELOG.md # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java # platform/android/scripts/exclude-activity-gen.json # platform/ios/CHANGELOG.md # platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec # platform/ios/Mapbox-iOS-SDK-symbols.podspec # platform/ios/Mapbox-iOS-SDK.podspec # platform/macos/CHANGELOG.md
Diffstat (limited to 'platform/darwin/scripts/generate-style-code.js')
-rwxr-xr-xplatform/darwin/scripts/generate-style-code.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index f919a649cb..8e82a8eb63 100755
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -318,14 +318,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") {
- doc += '* Interpolation and step functions applied to the `$zoomLevel` 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;
@@ -397,7 +398,7 @@ global.describeValue = function (value, property, layerType) {
throw new Error(`No description available for ${value[0]} expression in ${property.name} of ${layerType}.`);
}
}
-
+
switch (property.type) {
case 'boolean':
return value ? '`YES`' : '`NO`';