Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a52ae7a

Browse files
committed
add remove_all method
1 parent 60c2f0a commit a52ae7a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/gridstack.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,14 @@
439439
this._update_container_height();
440440
};
441441

442+
GridStack.prototype.remove_all = function () {
443+
_.each(this.grid.nodes, function (node) {
444+
node.el.remove();
445+
});
446+
this.grid.nodes = [];
447+
this._update_container_height();
448+
};
449+
442450
GridStack.prototype.resizable = function (el, val) {
443451
el = $(el);
444452
el.each(function (index, el) {

0 commit comments

Comments
 (0)