summaryrefslogtreecommitdiff
path: root/platform/darwin/scripts
diff options
context:
space:
mode:
authorAnand Thakker <anandthakker@users.noreply.github.com>2017-02-17 16:16:25 -0500
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-17 13:16:25 -0800
commit062b18374d580f3522f577c4dccbfcd15e260e80 (patch)
tree357406a6090d755b33b46534e44b9f47fb040360 /platform/darwin/scripts
parentd4c569a0187d98bca6b71671fa5daf6ee09747da (diff)
downloadqtlocation-mapboxgl-062b18374d580f3522f577c4dccbfcd15e260e80.tar.gz
[core] Enable property functions for text-{field,transform} (#7944)
Diffstat (limited to 'platform/darwin/scripts')
-rw-r--r--platform/darwin/scripts/generate-style-code.js9
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':