moveUpTillCollision called on gridster instead of vm
On version 1.11.3. Enabling the compactUp options causes an error to be thrown at line 1786 of the distribution gridster.js in the checkCompactUp function. The function is calling moveUpTillCollision on the gridster object that is passed in to GridsterCollision, but I believe it should be calling the function on the vm variable. After making the change locally it works again.
If you prefer a pull request I can try to get around to it later.
vm.checkCompactUp = function checkCompactUp() {
var widgetMovedUp = false, widget, moved;
var l = gridster.grid.length;
for (var i = 0; i < l; i++) {
widget = gridster.grid[i];
// This appears to be the issue. gridster should be vm.
moved = gridster.moveUpTillCollision(widget);
if (moved) {
widgetMovedUp = true;
widget.item.y = widget.$item.y;
widget.itemChanged();
}
}
if (widgetMovedUp) {
vm.checkCompactUp();
}
return widgetMovedUp;
};
Hi @adammatthewsmith , Ups, yeah a small fuck up on last patch version. Will try to make a new version fix today.
Thanks,
Hi @adammatthewsmith , Fixed v1.11.4
Thanks,
Awesome! Thanks for the quick fix.