Hello,
i'm using this nice lib in an angular 21 app with widget dashboard.
Already tested a lot of the functionalities and i ended up with an issue on the height calculation based on the rows defined by item.
With this config:
`
options: GridsterConfig = {
gridType: GridType.VerticalFixed,
margin: 20,
outerMargin: true,
minCols: 20,
maxCols: 20,
setGridSize: true,
fixedRowHeight: 20,
keepFixedHeightInMobile: true,
ignoreMarginInRow: true,
draggable: {
enabled: true
},
resizable: {
enabled: true
},
swap: false,
pushItems: true,
displayGrid: DisplayGrid.Always,
};
dashboard: GridsterItemConfig[] = [
{ cols: 13, rows: 6, y: 0, x: 0, id: 1 },
{ cols: 7, rows: 6, y: 0, x: 13, id: 2 },
{ cols: 10, rows: 10, y: 6, x: 0, id: 3 },
{ cols: 10, rows: 10, y: 6, x: 10, id: 4 },
{ cols: 20, rows: 4, y: 16, x: 0, id: 5 },
];
`
I have always my items with the wrong height.
So, for a the widget witn ID: 1
since we have 6 rows the height should be 6 * 20px (fixedRowHeight) = 120px, but actually it's rendered with 100px as you can see in the screenshot. It is subtracting a margin (20px)
Is this a bug? Is there a way to fix this?
Hello,
i'm using this nice lib in an angular 21 app with widget dashboard.
Already tested a lot of the functionalities and i ended up with an issue on the height calculation based on the rows defined by item.
With this config:
`
options: GridsterConfig = {
gridType: GridType.VerticalFixed,
margin: 20,
outerMargin: true,
minCols: 20,
maxCols: 20,
setGridSize: true,
fixedRowHeight: 20,
keepFixedHeightInMobile: true,
ignoreMarginInRow: true,
draggable: {
enabled: true
},
resizable: {
enabled: true
},
swap: false,
pushItems: true,
displayGrid: DisplayGrid.Always,
};
dashboard: GridsterItemConfig[] = [
{ cols: 13, rows: 6, y: 0, x: 0, id: 1 },
{ cols: 7, rows: 6, y: 0, x: 13, id: 2 },
{ cols: 10, rows: 10, y: 6, x: 0, id: 3 },
{ cols: 10, rows: 10, y: 6, x: 10, id: 4 },
{ cols: 20, rows: 4, y: 16, x: 0, id: 5 },
];
`
I have always my items with the wrong height.
So, for a the widget witn ID: 1
since we have 6 rows the height should be 6 * 20px (fixedRowHeight) = 120px, but actually it's rendered with 100px as you can see in the screenshot. It is subtracting a margin (20px)
Is this a bug? Is there a way to fix this?