Add minWidth and minHeight attributes to getNodeStyles function
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
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:
parent
f9e0f2b75e
commit
8af8c3364f
@ -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};`;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user