summaryrefslogtreecommitdiff
path: root/platform/android/scripts/generate-style-code.js
diff options
context:
space:
mode:
authorLauren Budorick <lauren@mapbox.com>2018-05-08 16:26:19 -0700
committerLauren Budorick <lauren@mapbox.com>2018-05-08 16:26:19 -0700
commit79b276882e86d9f45ebfd87e993502b88cb594d5 (patch)
tree99f08b42c89013a23ea823aafe3a6d0321626dfd /platform/android/scripts/generate-style-code.js
parent5f27a90d0b5adc5b71d272064a10bf1d89b5dc68 (diff)
downloadqtlocation-mapboxgl-upstream/lbud-expression-spec.tar.gz
Remove some isDataDriven uses/definitionsupstream/lbud-expression-spec
Diffstat (limited to 'platform/android/scripts/generate-style-code.js')
-rwxr-xr-xplatform/android/scripts/generate-style-code.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/platform/android/scripts/generate-style-code.js b/platform/android/scripts/generate-style-code.js
index 2c61eb87f9..05ca957974 100755
--- a/platform/android/scripts/generate-style-code.js
+++ b/platform/android/scripts/generate-style-code.js
@@ -267,19 +267,17 @@ global.propertyValueDoc = function (property, value) {
return doc;
};
-global.isDataDriven = function (property) {
- return property['property-type'] === 'data-driven' || property['property-type'] === 'cross-faded-data-driven';
-};
-
global.isLightProperty = function (property) {
return property['light-property'] === true;
};
global.propertyValueType = function (property) {
- if (isDataDriven(property)) {
- return `DataDrivenPropertyValue<${evaluatedType(property)}>`;
- } else {
- return `PropertyValue<${evaluatedType(property)}>`;
+ switch (property['property-type']) {
+ case 'data-driven':
+ case 'cross-faded-data-driven':
+ return `DataDrivenPropertyValue<${evaluatedType(property)}>`;
+ default:
+ return `PropertyValue<${evaluatedType(property)}>`;
}
};