diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-08-25 21:59:55 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-08-26 15:40:10 -0700 |
commit | 9d368ea98d096c1eed2c1eb7edc4a37ff31b03b7 (patch) | |
tree | 602b5aaf36a8d3db50e14b58e668f53ffe8d99a0 /platform/darwin/src/MGLStyleLayer.h.ejs | |
parent | 8dff7ab2f0fe1f2d1412e79c99285f1a389e6541 (diff) | |
download | qtlocation-mapboxgl-9d368ea98d096c1eed2c1eb7edc4a37ff31b03b7.tar.gz |
[ios, macos] Mark MGLStyleLayer properties null_resettable
If the property is unset, return the default value.
Fixes #6126.
Diffstat (limited to 'platform/darwin/src/MGLStyleLayer.h.ejs')
-rw-r--r-- | platform/darwin/src/MGLStyleLayer.h.ejs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/platform/darwin/src/MGLStyleLayer.h.ejs b/platform/darwin/src/MGLStyleLayer.h.ejs index 870c6a45c9..2b36a3067a 100644 --- a/platform/darwin/src/MGLStyleLayer.h.ejs +++ b/platform/darwin/src/MGLStyleLayer.h.ejs @@ -40,13 +40,16 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(prope <% for (const property of layoutProperties) { -%> /** - <%- propertyDoc(property, type) %><% if ('default' in property) { %> + <%- propertyDoc(property, type) %> +<% if ('default' in property) { -%> - <% if (property.required) { %>The default value of this property is <%= propertyDefault(property, type) %>.<% } else { %>If this property is set to `nil`, the layer uses an implicit default value of <%= propertyDefault(property, type) %>.<% } %><% } %><% if (property.requires) { %> + The default value of this property is <%- propertyDefault(property, type) %>.<% if (!property.required) { %> Set this property to `nil` to reset it to the default value.<% } %> +<% } if (property.requires) { -%> - <%= propertyReqs(property, layoutPropertiesByName, type) %><% } %> + <%- propertyReqs(property, layoutPropertiesByName, type) %> +<% } -%> */ -@property (nonatomic<% if (!property.required) { %>, nullable<% } %>) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>; +@property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>; <% } -%> <% } -%> @@ -54,13 +57,16 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(prope <% for (const property of paintProperties) { -%> /** - <%- propertyDoc(property, type) %><% if ('default' in property) { %> + <%- propertyDoc(property, type) %> +<% if ('default' in property) { -%> - <% if (property.required) { %>The default value of this property is <%= propertyDefault(property, type) %>.<% } else { %>If this property is set to `nil`, the layer uses an implicit default value of <%= propertyDefault(property, type) %>.<% } %><% } %><% if (property.requires) { %> + The default value of this property is <%- propertyDefault(property, type) %>.<% if (!property.required) { %> Set this property to `nil` to reset it to the default value.<% } %> +<% } if (property.requires) { -%> - <%= propertyReqs(property, paintPropertiesByName, type) %><% } %> + <%- propertyReqs(property, paintPropertiesByName, type) %> +<% } -%> */ -@property (nonatomic<% if (!property.required) { %>, nullable<% } %>) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>; +@property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>; <% } -%> @end |