Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PropertyFactory.iconPadding(Float) overload for better backcompat #2880

Merged
merged 4 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,16 @@ public static PropertyValue<Expression> iconRotate(Expression value) {
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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
random3940 marked this conversation as resolved.
Show resolved Hide resolved
}

<% } -%>
/**
* <%- propertyFactoryMethodDoc(property) %>
Expand Down
Loading