diff options
author | Anand Thakker <anandthakker@users.noreply.github.com> | 2017-02-17 16:16:25 -0500 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-17 13:16:25 -0800 |
commit | 062b18374d580f3522f577c4dccbfcd15e260e80 (patch) | |
tree | 357406a6090d755b33b46534e44b9f47fb040360 /platform/darwin/scripts/generate-style-code.js | |
parent | d4c569a0187d98bca6b71671fa5daf6ee09747da (diff) | |
download | qtlocation-mapboxgl-062b18374d580f3522f577c4dccbfcd15e260e80.tar.gz |
[core] Enable property functions for text-{field,transform} (#7944)
Diffstat (limited to 'platform/darwin/scripts/generate-style-code.js')
-rw-r--r-- | platform/darwin/scripts/generate-style-code.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index e9599b18b8..cacca57700 100644 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -434,6 +434,13 @@ global.propertyType = function (property) { } }; +global.isInterpolatable = function (property) { + const type = property.type === 'array' ? property.value : property.type; + return type !== 'boolean' && + type !== 'enum' && + type !== 'string'; +}; + global.valueTransformerArguments = function (property) { let objCType = propertyType(property); switch (property.type) { @@ -444,7 +451,7 @@ global.valueTransformerArguments = function (property) { case 'string': return ['std::string', objCType]; case 'enum': - return [`mbgl::style::${mbglType(property)}`, objCType]; + return [mbglType(property), 'NSValue *', mbglType(property), `MGL${camelize(property.name)}`]; case 'color': return ['mbgl::Color', objCType]; case 'array': |