[build] Special case heatmap-color so it doesn't crash make style-code

This commit is contained in:
John Firebaugh
2018-01-05 14:37:28 -08:00
parent 9f89832827
commit 7ca62ec602
2 changed files with 9 additions and 1 deletions

View File

@@ -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) {

View File

@@ -111,6 +111,10 @@ global.defaultValue = function (property) {
return '{}';
}
if (property.name === 'heatmap-color') {
return '{}';
}
switch (property.type) {
case 'number':
return property.default;