我目前正在研究 angular-gridster2 的集成。目标是获得具有固定行高、固定列数和大小的网格。这是我当前的 GridsterConfig:
{
setGridSize: true,
margin: 5,
displayGrid: DisplayGrid.OnDragAndResize,
gridType: GridType.VerticalFixed,
keepFixedHeightInMobile: true,
fixedRowHeight: 50,
minCols: 6,
maxCols: 6,
swap: true,
pushItems: true,
resizable: { enabled: true },
draggable: {enabled: true },
enableEmptyCellDrop: true,
}
使用此配置,网格高度按预期计算(完美)。问题是窗口调整大小后宽度保持不变。当我将 setGridSize 属性设置为 false 时,宽度计算按预期工作,但高度始终是边距的 2 倍。