From c309856f8de2a53848d14a77803efe398fa2911c Mon Sep 17 00:00:00 2001 From: pmoradei Date: Mon, 29 Feb 2016 19:52:46 +0100 Subject: [PATCH] Add a parameter to setGridWidth method to allow not to propagate resizing to widgets. --- src/gridstack.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gridstack.js b/src/gridstack.js index 6e61887..1bdf08d 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -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); };