0

我在我的 angular 6 应用程序中使用 angular-gridster2。每当我拖动网格时,它都会超出容器。我想限制网格移出我的容器。

我试过给gridType:'fit'。但它不工作。

4

1 回答 1

1

你可以设置gridType: GridType.Fixed

并设置网格列maxColsmaxRows网格行值的选项。

this.options.maxCols = this.gridster.gridColumns.length;
this.options.maxRows = this.gridster.gridRows.length;

它在我身边工作。

于 2019-07-10T09:09:31.430 回答