diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-01-05 14:37:28 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-01-09 13:37:59 -0800 |
commit | 7c7c609a0c18cc232f610b5726d0b5eec5cfad07 (patch) | |
tree | 32d81ed776fb85c773f0f70542361156126e642c | |
parent | 1af80012f0e274df0f2b753a263003f11be86e41 (diff) | |
download | qtlocation-mapboxgl-7c7c609a0c18cc232f610b5726d0b5eec5cfad07.tar.gz |
[build] Special case heatmap-color so it doesn't crash `make style-code`
-rw-r--r-- | platform/darwin/scripts/generate-style-code.js | 6 | ||||
-rw-r--r-- | scripts/generate-style-code.js | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index ea3c26eaba..51a5052110 100644 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -413,7 +413,11 @@ global.describeValue = function (value, property, layerType) { }; global.propertyDefault = function (property, layerType) { - return 'an `MGLStyleValue` object containing ' + describeValue(property.default, property, layerType); + if (property.name === 'heatmap-color') { + return 'a rainbow color scale from blue to red'; + } else { + return 'an `MGLStyleValue` object containing ' + describeValue(property.default, property, layerType); + } }; global.originalPropertyName = function (property) { diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js index 443f0c7cc9..dbca4216ad 100644 --- a/scripts/generate-style-code.js +++ b/scripts/generate-style-code.js @@ -111,6 +111,10 @@ global.defaultValue = function (property) { return '{}'; } + if (property.name === 'heatmap-color') { + return '{}'; + } + switch (property.type) { case 'number': return property.default; |