Add a parameter to setGridWidth method to allow not to propagate resizing to widgets.

This commit is contained in:
pmoradei 2016-02-29 19:52:46 +01:00
parent ba1ee253bb
commit c309856f8d

View file

@ -1417,10 +1417,13 @@
this.grid.commit();
};
GridStack.prototype.setGridWidth = function(gridWidth) {
GridStack.prototype.setGridWidth = function(gridWidth,doNotPropagate) {
this.container.removeClass('grid-stack-' + this.opts.width);
this._updateNodeWidths(this.opts.width, gridWidth);
if (doNotPropagate !== true) {
this._updateNodeWidths(this.opts.width, gridWidth);
}
this.opts.width = gridWidth;
this.grid.width = gridWidth;
this.container.addClass('grid-stack-' + gridWidth);
};