tiberiuzuld/angular-gridster2

Gridster not allowing to add item when defaultItemCols and defaultItemRows is more then 1.

Opened this issue · 1 comments

Hello,

I implemented drag-and-drop with Gridster's latest updates and Declared defaultItemCols is set to 6 and defaultItemRows 3 which makes 6x3 Gridster item. But with this configuration Gridster not allowing to add the item from cell 7.

current widget options is set as below:
this.options = {
enableEmptyCellDrop: true,
draggable: {
enabled: true,
stop: this.dragStop.bind(this),
delayStart: 300,
},
swap: this.widgetSwap,
disablePushOnDrag: this.widgetPush,
pushItems: true,
resizable: {
enabled: this.enableResizable,
},
minCols: 12,
minRows: 25,
maxCols: 12,
emptyCellDropCallback: this.onDrop.bind(this),
displayGrid: "onDrag&Resize",
pushDirections: { north: true, east: true, south: true, west: true },
itemResizeCallback: this.itemResize.bind(this),
itemChangeCallback: this.itemChange.bind(this),
gridType: "scrollVertical",
margin: 10,
scrollToNewItems: "true",
defaultItemCols: 3,
defaultItemRows: 2,
minItemCols: 1,
minItemRows: 1,
addEmptyRowsCount: 10,
compactType: this.compactType,
// enableBoundaryControl: true
};

Attached issue gif .
Issue_gif