Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pushItem() {
const push = new GridsterPush(this.itemToPush); // init the service
this.itemToPush.$item.rows += 4; // move/resize your item
if (push.pushItems(push.fromNorth)) { // push items from a direction
push.checkPushBack(); // check for items can restore to original position
push.setPushedItems(); // save the items pushed
this.itemToPush.setSize();
this.itemToPush.checkItemChanges(this.itemToPush.$item, this.itemToPush.item);
} else {
this.itemToPush.$item.rows -= 4;
push.restoreItems(); // restore to initial state the pushed items
}
push.destroy(); // destroy push instance
// similar for GridsterPushResize and GridsterSwap
}
}