bug fixes related to code generation

This commit is contained in:
paul
2024-09-30 15:30:46 +05:30
parent c39960348d
commit b8bd0c74a6
14 changed files with 98 additions and 36 deletions

View File

@@ -570,7 +570,7 @@ class Widget extends React.Component {
}
setLayout(value) {
const { layout, direction, grid = { rows: 1, cols: 1 }, gap = 10 } = value
const { layout, direction, grid = { rows: 1, cols: 1 }, gap = 10, align } = value
// console.log("layout value: ", value)
// FIXME: In grid layout the layout doesn't adapt to the size of the child if resized
@@ -586,6 +586,16 @@ class Widget extends React.Component {
// gridAutoCols: 'minmax(100px, auto)', // Cols with minimum height of 100px, and grow to fit content
}
if (align === "start"){
widgetStyle["alignItems"] = "flex-start"
}else if (align === "center"){
widgetStyle["alignItems"] = "center"
}else if (align === "end"){
widgetStyle["alignItems"] = "flex-end"
}else{
widgetStyle["alignItems"] = "unset"
}
this.updateState({
widgetInnerStyling: widgetStyle
})