Add PropertyFactory.iconPadding(Float) overload for better backcompat (#2880)
This commit is contained in:
@@ -2047,6 +2047,16 @@ The unit is in density-independent pixels only for SDF sprites that were created
|
||||
return new LayoutPropertyValue<>("icon-rotate", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Size of additional area round the icon bounding box used for detecting symbol collisions.
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static PropertyValue<Float> iconPadding(Float value) {
|
||||
return new LayoutPropertyValue<>("icon-padding", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Size of additional area round the icon bounding box used for detecting symbol collisions.
|
||||
*
|
||||
|
||||
@@ -90,6 +90,18 @@ public class PropertyFactory {
|
||||
return new LayoutPropertyValue<>("<%- property.name %>", value);
|
||||
}
|
||||
|
||||
<% } -%>
|
||||
<% if (property.type === 'padding') { -%>
|
||||
/**
|
||||
* <%- propertyFactoryMethodDoc(property) %>
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static PropertyValue<Float> <%- camelizeWithLeadingLowercase(property.name) %>(Float value) {
|
||||
return new LayoutPropertyValue<>("<%- property.name %>", value);
|
||||
}
|
||||
|
||||
<% } -%>
|
||||
/**
|
||||
* <%- propertyFactoryMethodDoc(property) %>
|
||||
|
||||
Reference in New Issue
Block a user