Add minWidth and minHeight attributes to getNodeStyles function
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good

This update enhances the getNodeStyles function in templatemanager.js by adding support for minWidth and minHeight attributes. This allows for more flexible styling options when defining node styles, improving the overall template management capabilities.
This commit is contained in:
Tom Butcher 2026-08-19 19:36:41 +01:00
parent f9e0f2b75e
commit 8af8c3364f

View File

@ -63,9 +63,15 @@ function getNodeStyles(attributes) {
if (attributes?.height) { if (attributes?.height) {
styles += `height: ${attributes.height};`; styles += `height: ${attributes.height};`;
} }
if (attributes?.minWidth) {
styles += `min-width: ${attributes.minWidth};`;
}
if (attributes?.maxWidth) { if (attributes?.maxWidth) {
styles += `max-width: ${attributes.maxWidth};`; styles += `max-width: ${attributes.maxWidth};`;
} }
if (attributes?.minHeight) {
styles += `min-height: ${attributes.minHeight};`;
}
if (attributes?.maxHeight) { if (attributes?.maxHeight) {
styles += `max-height: ${attributes.maxHeight};`; styles += `max-height: ${attributes.maxHeight};`;
} }