summaryrefslogtreecommitdiff
path: root/platform/darwin/scripts/generate-style-code.js
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-03-28 12:06:43 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-03-29 16:18:41 +0200
commit2cfdd1a2f7042650538d24058fc28ad092739073 (patch)
tree394e1f879a83e8ba12ac37630ee8b2463293efcf /platform/darwin/scripts/generate-style-code.js
parent1eaae50ffe0fa6bc0be96d705d7a5bd18b4fdf4f (diff)
downloadqtlocation-mapboxgl-2cfdd1a2f7042650538d24058fc28ad092739073.tar.gz
[Darwin] Improve documentation for enum array propertiesupstream/az-accounts
Diffstat (limited to 'platform/darwin/scripts/generate-style-code.js')
-rwxr-xr-xplatform/darwin/scripts/generate-style-code.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index 1e7b2a3973..2eabd0a92b 100755
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -352,6 +352,9 @@ global.propertyDoc = function (propertyName, property, layerType, kind) {
if (property.type === 'enum') {
doc += '* Any of the following constant string values:\n';
doc += Object.keys(property.values).map(value => ' * `' + value + '`: ' + property.values[value].doc).join('\n') + '\n';
+ } else if (property.type === 'array' && property.value === 'enum') {
+ doc += '* Constant array, whose each element is any of the following constant string values:\n';
+ doc += Object.keys(property.values).map(value => ' * `' + value + '`: ' + property.values[value].doc).join('\n') + '\n';
}
doc += '* Predefined functions, including mathematical and string operators\n' +
'* Conditional expressions\n' +
@@ -426,6 +429,8 @@ global.describeType = function (property) {
return '`CGVector`';
case 'position':
return '`MGLSphericalPosition`';
+ case 'anchor':
+ return '`MGLTextAnchor` array';
default:
return 'array';
}