committed by
Minh Nguyễn
parent
aa03f0cab7
commit
a4fcea4122
@@ -87,6 +87,16 @@ global.testArrayImplementation = function (property) {
|
||||
}
|
||||
};
|
||||
|
||||
global.propertyDoc = function (property, layerType) {
|
||||
let doc = property.doc.replace(/`(.+?)`/g, function (m, symbol, offset, str) {
|
||||
if (!('values' in property && property.values.indexOf(symbol) !== -1) && str.substr(offset - 4, 3) !== 'CSS') {
|
||||
symbol = camelizeWithLeadingLowercase(symbol);
|
||||
}
|
||||
return '`' + symbol + '`';
|
||||
});
|
||||
return doc;
|
||||
};
|
||||
|
||||
global.propertyType = function (property, _private) {
|
||||
return _private ? `id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>` : `id <MGLStyleAttributeValue>`;
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@ typedef NS_ENUM(NSUInteger, MGLFillStyleLayerFillTranslateAnchor) {
|
||||
@property (nonatomic) id <MGLStyleAttributeValue> fillColor;
|
||||
|
||||
/**
|
||||
The outline color of the fill. Matches the value of `fill-color` if unspecified.
|
||||
The outline color of the fill. Matches the value of `fillColor` if unspecified.
|
||||
*/
|
||||
@property (nonatomic) id <MGLStyleAttributeValue> fillOutlineColor;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(prope
|
||||
|
||||
<% for (const property of layoutProperties) { -%>
|
||||
/**
|
||||
<%- property.doc %>
|
||||
<%- propertyDoc(property, type) %>
|
||||
*/
|
||||
@property (nonatomic) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>;
|
||||
|
||||
@@ -46,7 +46,7 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(prope
|
||||
|
||||
<% for (const property of paintProperties) { -%>
|
||||
/**
|
||||
<%- property.doc %>
|
||||
<%- propertyDoc(property, type) %>
|
||||
*/
|
||||
@property (nonatomic) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>;
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
|
||||
@property (nonatomic) id <MGLStyleAttributeValue> iconOffset;
|
||||
|
||||
/**
|
||||
Aligns text to the plane of the `viewport` or the `map` when the map is pitched. Matches `text-rotation-alignment` if unspecified.
|
||||
Aligns text to the plane of the `viewport` or the `map` when the map is pitched. Matches `textRotationAlignment` if unspecified.
|
||||
*/
|
||||
@property (nonatomic) id <MGLStyleAttributeValue> textPitchAlignment;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user