Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的 angular 6 应用程序中使用 angular-gridster2。每当我拖动网格时,它都会超出容器。我想限制网格移出我的容器。
我试过给gridType:'fit'。但它不工作。
你可以设置gridType: GridType.Fixed
gridType: GridType.Fixed
并设置网格列maxCols和maxRows网格行值的选项。
maxCols
maxRows
this.options.maxCols = this.gridster.gridColumns.length; this.options.maxRows = this.gridster.gridRows.length;
它在我身边工作。