summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generate-style-code.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js
index 6379598446..1796cda212 100644
--- a/scripts/generate-style-code.js
+++ b/scripts/generate-style-code.js
@@ -21,8 +21,8 @@ global.propertyType = function (property) {
if (/-translate-anchor$/.test(property.name)) {
return 'TranslateAnchorType';
}
- if (/-rotation-alignment$/.test(property.name)) {
- return 'RotationAlignmentType';
+ if (/-(rotation|pitch)-alignment$/.test(property.name)) {
+ return 'AlignmentType';
}
switch (property.type) {
case 'boolean':
@@ -57,7 +57,11 @@ global.defaultValue = function (property) {
case 'string':
return JSON.stringify(property.default || "");
case 'enum':
- return `${propertyType(property)}::${camelize(property.default)}`;
+ if (property.default === undefined) {
+ return `${propertyType(property)}::Undefined`;
+ } else {
+ return `${propertyType(property)}::${camelize(property.default)}`;
+ }
case 'color':
return `{{ ${parseCSSColor(property.default).join(', ')} }}`
case 'array':