From 7c7c609a0c18cc232f610b5726d0b5eec5cfad07 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 5 Jan 2018 14:37:28 -0800 Subject: [build] Special case heatmap-color so it doesn't crash `make style-code` --- platform/darwin/scripts/generate-style-code.js | 6 +++++- scripts/generate-style-code.js | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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; -- cgit v1.2.1