diff --git a/Gruntfile.js b/Gruntfile.js
old mode 100755
new mode 100644
diff --git a/README.md b/README.md
index b22d819..4bdc993 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,7 @@ gridstack.js
============
gridstack.js is a jQuery plugin for widget layout. This is drag-and-drop multi-column grid. It allows you to build
-draggable responsive bootstrap v3 friendly layouts. It also works great with [knockout.js](http://knockoutjs.com) and
-touch devices.
+draggable responsive bootstrap v3 friendly layouts. It also works great with [knockout.js](http://knockoutjs.com), [angular.js](https://angularjs.org) and touch devices.
Inspired by [gridster.js](http://gridster.net). Built with love.
@@ -71,6 +70,7 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com
- [IE8 support](#ie8-support)
- [Nested grids](#nested-grids)
- [Changes](#changes)
+ - [v0.2.5-dev (Development version)](#v025-dev-development-version)
- [v0.2.4 (2016-02-15)](#v024-2016-02-15)
- [v0.2.3 (2015-06-23)](#v023-2015-06-23)
- [v0.2.2 (2014-12-23)](#v022-2014-12-23)
@@ -157,7 +157,10 @@ $(function () {
(default: `false`)
- `animate` - turns animation on (default: `false`)
- `auto` - if `false` gridstack will not initialize existing items (default: `true`)
-- `cell_height` - one cell height (default: `60`)
+- `cell_height` - one cell height (default: `60`). Can be:
+ - an integer (px)
+ - a string (ex: '10em', '100px', '10rem')
+ - 0 or null, in which case the library will not generate styles for rows. Everything will have to be defined in CSS files.
- `draggable` - allows to override jQuery UI draggable options. (default: `{handle: '.grid-stack-item-content', scroll: true, appendTo: 'body'}`)
- `handle` - draggable handle selector (default: `'.grid-stack-item-content'`)
- `handle_class` - draggable handle class (e.g. `'grid-stack-item-content'`). If set `handle` is ignored (default: `null`)
@@ -169,7 +172,9 @@ $(function () {
- `placeholder_text` - placeholder default content (default: `''`)
- `resizable` - allows to override jQuery UI resizable options. (default: `{autoHide: true, handles: 'se'}`)
- `static_grid` - makes grid static (default `false`). If true widgets are not movable/resizable. You don't even need jQueryUI draggable/resizable. A CSS class `grid-stack-static` is also added to the container.
-- `vertical_margin` - vertical gap size (default: `20`)
+- `vertical_margin` - vertical gap size (default: `20`). Can be:
+ - an integer (px)
+ - a string (ex: '2em', '20px', '2rem')
- `width` - amount of columns (default: `12`)
## Grid attributes
@@ -177,6 +182,7 @@ $(function () {
- `data-gs-animate` - turns animation on
- `data-gs-width` - amount of columns
- `data-gs-height` - maximum rows amount. Default is `0` which means no maximum rows.
+- `data-gs-current-height` - current rows amount. Set by the library only. Can be used by the CSS rules.
## Item attributes
@@ -245,7 +251,7 @@ $('.grid-stack').on('resizestop', function (event, ui) {
### disable(event)
-```javascipt
+```javascript
$('.grid-stack').on('disable', function(event) {
var grid = event.target;
});
@@ -253,7 +259,7 @@ $('.grid-stack').on('disable', function(event) {
### enable(event)
-```javascipt
+```javascript
$('.grid-stack').on('enable', function(event) {
var grid = event.target;
});
@@ -557,7 +563,7 @@ See examples: [example 1](http://troolee.github.io/gridstack.js/demo/knockout.ht
**Notes:** It's very important to exclude training spaces after widget template:
-```
+```javascript
template:
[
'
',
@@ -772,6 +778,10 @@ See example: [Nested grid demo](http://troolee.github.io/gridstack.js/demo/neste
Changes
=======
+#### v0.2.5-dev (Development version)
+
+- `cell_height` and `vertical_margin` can now be string (e.g. '3em', '20px') (Thanks to @jlowcs)
+
#### v0.2.4 (2016-02-15)
- fix closure compiler/linter warnings
diff --git a/dist/gridstack.js b/dist/gridstack.js
old mode 100755
new mode 100644
index 15e2a2a..36689a4
--- a/dist/gridstack.js
+++ b/dist/gridstack.js
@@ -426,6 +426,9 @@
});
this.opts.is_nested = is_nested;
+ this.cell_height(this.opts.cell_height, true);
+ this.vertical_margin(this.opts.vertical_margin, true);
+
this.container.addClass(this.opts._class);
this._set_static_class();
@@ -475,9 +478,7 @@
'
' +
'
' + this.opts.placeholder_text + '
').hide();
- this.container.height(
- this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) -
- this.opts.vertical_margin);
+ this._update_container_height();
this.on_resize_handler = function() {
if (self._is_one_column_mode()) {
@@ -542,6 +543,9 @@
};
GridStack.prototype._init_styles = function() {
+ if (!this.opts.cell_height) { //that will be handled by CSS
+ return ;
+ }
if (this._styles_id) {
$('[data-gs-id="' + this._styles_id + '"]').remove();
}
@@ -556,7 +560,10 @@
return;
}
- var prefix = '.' + this.opts._class + ' .' + this.opts.item_class;
+ var prefix = '.' + this.opts._class + ' .' + this.opts.item_class,
+ self = this,
+ get_height
+ ;
if (typeof max_height == 'undefined') {
max_height = this._styles._max;
@@ -564,30 +571,50 @@
this._update_container_height();
}
+ if (!this.opts.cell_height) { //the rest will be handled by CSS
+ return ;
+ }
+ if (this._styles._max !== 0 && max_height <= this._styles._max) {
+ return ;
+ }
+
+ if (!this.opts.vertical_margin || this.opts.cell_height_unit === this.opts.vertical_margin_unit) {
+ get_height = function (nbRows, nbMargins) {
+ return (self.opts.cell_height * nbRows + self.opts.vertical_margin * nbMargins) + self.opts.cell_height_unit;
+ }
+ } else {
+ get_height = function (nbRows, nbMargins) {
+ if (!nbRows || !nbMargins) {
+ return (self.opts.cell_height * nbRows + self.opts.vertical_margin * nbMargins) + self.opts.cell_height_unit;
+ }
+ return 'calc(' + ((self.opts.cell_height * nbRows) + self.opts.cell_height_unit) + ' + ' + ((self.opts.vertical_margin * nbMargins) + self.opts.vertical_margin_unit) + ')';
+ }
+ }
+
if (this._styles._max == 0) {
- Utils.insert_css_rule(this._styles, prefix, 'min-height: ' + (this.opts.cell_height) + 'px;', 0);
+ Utils.insert_css_rule(this._styles, prefix, 'min-height: ' + get_height(1, 0) + ';', 0);
}
if (max_height > this._styles._max) {
for (var i = this._styles._max; i < max_height; ++i) {
Utils.insert_css_rule(this._styles,
prefix + '[data-gs-height="' + (i + 1) + '"]',
- 'height: ' + (this.opts.cell_height * (i + 1) + this.opts.vertical_margin * i) + 'px;',
+ 'height: ' + get_height(i + 1, i) + ';',
i
);
Utils.insert_css_rule(this._styles,
prefix + '[data-gs-min-height="' + (i + 1) + '"]',
- 'min-height: ' + (this.opts.cell_height * (i + 1) + this.opts.vertical_margin * i) + 'px;',
+ 'min-height: ' + get_height(i + 1, i) + ';',
i
);
Utils.insert_css_rule(this._styles,
prefix + '[data-gs-max-height="' + (i + 1) + '"]',
- 'max-height: ' + (this.opts.cell_height * (i + 1) + this.opts.vertical_margin * i) + 'px;',
+ 'max-height: ' + get_height(i + 1, i) + ';',
i
);
Utils.insert_css_rule(this._styles,
prefix + '[data-gs-y="' + i + '"]',
- 'top: ' + (this.opts.cell_height * i + this.opts.vertical_margin * i) + 'px;',
+ 'top: ' + get_height(i, i) + ';',
i
);
}
@@ -599,9 +626,18 @@
if (this.grid._update_counter) {
return;
}
- this.container.height(
- this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) -
- this.opts.vertical_margin);
+ var height = this.grid.get_grid_height();
+ this.container.attr('data-gs-current-height', height);
+ if (!this.opts.cell_height) {
+ return ;
+ }
+ if (!this.opts.vertical_margin) {
+ this.container.css('height', (height * (this.opts.cell_height)) + this.opts.cell_height_unit);
+ } else if (this.opts.cell_height_unit === this.opts.vertical_margin_unit) {
+ this.container.css('height', (height * (this.opts.cell_height + this.opts.vertical_margin) - this.opts.vertical_margin) + this.opts.cell_height_unit);
+ } else {
+ this.container.css('height', 'calc(' + ((height * (this.opts.cell_height)) + this.opts.cell_height_unit) + ' + ' + ((height * (this.opts.vertical_margin - 1)) + this.opts.vertical_margin_unit) + ')');
+ }
};
GridStack.prototype._is_one_column_mode = function() {
@@ -659,8 +695,9 @@
var o = $(this);
self.grid.clean_nodes();
self.grid.begin_update(node);
- cell_width = o.outerWidth() / o.attr('data-gs-width');
- cell_height = self.opts.cell_height + self.opts.vertical_margin;
+ cell_width = Math.ceil(o.outerWidth() / o.attr('data-gs-width'));
+ var strict_cell_height = Math.ceil(o.outerHeight() / o.attr('data-gs-height'));
+ cell_height = self.container.height() / parseInt(self.container.attr('data-gs-current-height'));
self.placeholder
.attr('data-gs-x', o.attr('data-gs-x'))
.attr('data-gs-y', o.attr('data-gs-y'))
@@ -669,8 +706,8 @@
.show();
node.el = self.placeholder;
- el.resizable('option', 'minWidth', Math.round(cell_width * (node.min_width || 1)));
- el.resizable('option', 'minHeight', self.opts.cell_height * (node.min_height || 1));
+ el.resizable('option', 'minWidth', cell_width * (node.min_width || 1));
+ el.resizable('option', 'minHeight', strict_cell_height * (node.min_height || 1));
if (event.type == 'resizestart') {
o.find('.grid-stack-item').trigger('resizestart');
@@ -864,39 +901,39 @@
return this;
};
- GridStack.prototype.min_height = function (el, val) {
- el = $(el);
- el.each(function (index, el) {
- el = $(el);
- var node = el.data('_gridstack_node');
- if (typeof node == 'undefined' || node == null) {
- return;
- }
+ GridStack.prototype.min_height = function (el, val) {
+ el = $(el);
+ el.each(function (index, el) {
+ el = $(el);
+ var node = el.data('_gridstack_node');
+ if (typeof node == 'undefined' || node == null) {
+ return;
+ }
- if(!isNaN(val)){
- node.min_height = (val || false);
- el.attr('data-gs-min-height', val);
- }
- });
- return this;
- };
+ if(!isNaN(val)){
+ node.min_height = (val || false);
+ el.attr('data-gs-min-height', val);
+ }
+ });
+ return this;
+ };
- GridStack.prototype.min_width = function (el, val) {
- el = $(el);
- el.each(function (index, el) {
- el = $(el);
- var node = el.data('_gridstack_node');
- if (typeof node == 'undefined' || node == null) {
- return;
- }
+ GridStack.prototype.min_width = function (el, val) {
+ el = $(el);
+ el.each(function (index, el) {
+ el = $(el);
+ var node = el.data('_gridstack_node');
+ if (typeof node == 'undefined' || node == null) {
+ return;
+ }
- if(!isNaN(val)){
- node.min_width = (val || false);
- el.attr('data-gs-min-width', val);
- }
- });
- return this;
- };
+ if(!isNaN(val)){
+ node.min_width = (val || false);
+ el.attr('data-gs-min-width', val);
+ }
+ });
+ return this;
+ };
GridStack.prototype._update_element = function(el, callback) {
el = $(el).first();
@@ -947,15 +984,59 @@
});
};
- GridStack.prototype.cell_height = function(val) {
- if (typeof val == 'undefined') {
- return this.opts.cell_height;
+ function parseHeight(val) {
+ var height = val;
+ var height_unit = 'px';
+ if (height && _.isString(height)) {
+ var match = height.match(/^([0-9]+)(px|em|rem)?$/);
+ if (!match) {
+ throw new Error('Invalid height');
+ }
+ height_unit = match[2];
+ height = parseInt(match[1]);
+ }
+ return {height: height, unit: height_unit};
+ }
+
+ GridStack.prototype.vertical_margin = function (val, noUpdate) {
+ if (typeof val == 'undefined') {
+ return this.opts.vertical_margin;
+ }
+
+ var heightData = parseHeight(val);
+
+ if (this.opts.vertical_margin_unit === heightData.unit && this.opts.height === heightData.height) {
+ return ;
+ }
+ this.opts.vertical_margin_unit = heightData.unit;
+ this.opts.vertical_margin = heightData.height;
+
+ if (!noUpdate) {
+ this._update_styles();
+ }
+ };
+
+ GridStack.prototype.cell_height = function (val, noUpdate) {
+ if (typeof val == 'undefined') {
+ if (this.opts.cell_height) {
+ return this.opts.cell_height;
+ } else {
+ var o = this.container.children('.' + this.opts.item_class).first();
+ return Math.ceil(o.outerHeight() / o.attr('data-gs-height'));
+ }
+ }
+
+ var heightData = parseHeight(val);
+
+ if (this.opts.cell_height_unit === heightData.height_unit && this.opts.height === heightData.height) {
+ return ;
+ }
+ this.opts.cell_height_unit = heightData.unit;
+ this.opts.cell_height = heightData.height;
+
+ if (!noUpdate) {
+ this._update_styles();
}
- val = parseInt(val);
- if (val == this.opts.cell_height)
- return;
- this.opts.cell_height = val || this.opts.cell_height;
- this._update_styles();
};
GridStack.prototype.cell_width = function() {
@@ -969,7 +1050,7 @@
var relativeTop = position.top - containerPos.top;
var column_width = Math.floor(this.container.width() / this.opts.width);
- var row_height = this.opts.cell_height + this.opts.vertical_margin;
+ var row_height = Math.floor(this.container.height() / parseInt(this.container.attr('data-gs-current-height')));
return {x: Math.floor(relativeLeft / column_width), y: Math.floor(relativeTop / row_height)};
};
diff --git a/dist/gridstack.min.js b/dist/gridstack.min.js
index 52d486f..df10912 100644
--- a/dist/gridstack.min.js
+++ b/dist/gridstack.min.js
@@ -5,5 +5,5 @@
* gridstack.js may be freely distributed under the MIT license.
* @preserve
*/
-!function(a){if("function"==typeof define&&define.amd)define(["jquery","lodash","jquery-ui/core","jquery-ui/widget","jquery-ui/mouse","jquery-ui/draggable","jquery-ui/resizable"],a);else if("undefined"!=typeof exports){try{jQuery=require("jquery")}catch(b){}try{_=require("lodash")}catch(b){}a(jQuery,_)}else a(jQuery,_)}(function(a,b){var c=window,d={is_intercepted:function(a,b){return!(a.x+a.width<=b.x||b.x+b.width<=a.x||a.y+a.height<=b.y||b.y+b.height<=a.y)},sort:function(a,c,d){return d=d||b.chain(a).map(function(a){return a.x+a.width}).max().value(),c=-1!=c?1:-1,b.sortBy(a,function(a){return c*(a.x+a.y*d)})},create_stylesheet:function(a){var b=document.createElement("style");return b.setAttribute("type","text/css"),b.setAttribute("data-gs-id",a),b.styleSheet?b.styleSheet.cssText="":b.appendChild(document.createTextNode("")),document.getElementsByTagName("head")[0].appendChild(b),b.sheet},remove_stylesheet:function(b){a("STYLE[data-gs-id="+b+"]").remove()},insert_css_rule:function(a,b,c,d){"function"==typeof a.insertRule?a.insertRule(b+"{"+c+"}",d):"function"==typeof a.addRule&&a.addRule(b,c,d)},toBool:function(a){return"boolean"==typeof a?a:"string"==typeof a?(a=a.toLowerCase(),!(""==a||"no"==a||"false"==a||"0"==a)):Boolean(a)}},e=0,f=function(a,b,c,d,e){this.width=a,this["float"]=c||!1,this.height=d||0,this.nodes=e||[],this.onchange=b||function(){},this._update_counter=0,this._float=this["float"]};f.prototype.batch_update=function(){this._update_counter=1,this["float"]=!0},f.prototype.commit=function(){this._update_counter=0,0==this._update_counter&&(this["float"]=this._float,this._pack_nodes(),this._notify())},f.prototype._fix_collisions=function(a){this._sort_nodes(-1);var c=a,e=Boolean(b.find(this.nodes,function(a){return a.locked}));for(this["float"]||e||(c={x:0,y:a.y,width:this.width,height:a.height});;){var f=b.find(this.nodes,b.bind(function(b){return b!=a&&d.is_intercepted(b,c)},this));if("undefined"==typeof f)return;this.move_node(f,f.x,a.y+a.height,f.width,f.height,!0)}},f.prototype.is_area_empty=function(a,c,e,f){var g={x:a||0,y:c||0,width:e||1,height:f||1},h=b.find(this.nodes,b.bind(function(a){return d.is_intercepted(a,g)},this));return null==h},f.prototype._sort_nodes=function(a){this.nodes=d.sort(this.nodes,a,this.width)},f.prototype._pack_nodes=function(){this._sort_nodes(),this["float"]?b.each(this.nodes,b.bind(function(a,c){if(!a._updating&&"undefined"!=typeof a._orig_y&&a.y!=a._orig_y)for(var e=a.y;e>=a._orig_y;){var f=b.chain(this.nodes).find(function(b){return a!=b&&d.is_intercepted({x:a.x,y:e,width:a.width,height:a.height},b)}).value();f||(a._dirty=!0,a.y=e),--e}},this)):b.each(this.nodes,b.bind(function(a,c){if(!a.locked)for(;a.y>0;){var e=a.y-1,f=0==c;if(c>0){var g=b.chain(this.nodes).take(c).find(function(b){return d.is_intercepted({x:a.x,y:e,width:a.width,height:a.height},b)}).value();f="undefined"==typeof g}if(!f)break;a._dirty=a.y!=e,a.y=e}},this))},f.prototype._prepare_node=function(a,c){return a=b.defaults(a||{},{width:1,height:1,x:0,y:0}),a.x=parseInt(""+a.x),a.y=parseInt(""+a.y),a.width=parseInt(""+a.width),a.height=parseInt(""+a.height),a.auto_position=a.auto_position||!1,a.no_resize=a.no_resize||!1,a.no_move=a.no_move||!1,a.width>this.width?a.width=this.width:a.width<1&&(a.width=1),a.height<1&&(a.height=1),a.x<0&&(a.x=0),a.x+a.width>this.width&&(c?a.width=this.width-a.x:a.x=this.width-a.width),a.y<0&&(a.y=0),a},f.prototype._notify=function(){if(!this._update_counter){var a=Array.prototype.slice.call(arguments,1).concat(this.get_dirty_nodes());a=a.concat(this.get_dirty_nodes()),this.onchange(a)}},f.prototype.clean_nodes=function(){b.each(this.nodes,function(a){a._dirty=!1})},f.prototype.get_dirty_nodes=function(){return b.filter(this.nodes,function(a){return a._dirty})},f.prototype.add_node=function(a){if(a=this._prepare_node(a),"undefined"!=typeof a.max_width&&(a.width=Math.min(a.width,a.max_width)),"undefined"!=typeof a.max_height&&(a.height=Math.min(a.height,a.max_height)),"undefined"!=typeof a.min_width&&(a.width=Math.max(a.width,a.min_width)),"undefined"!=typeof a.min_height&&(a.height=Math.max(a.height,a.min_height)),a._id=++e,a._dirty=!0,a.auto_position){this._sort_nodes();for(var c=0;;++c){var f=c%this.width,g=Math.floor(c/this.width);if(!(f+a.width>this.width||b.find(this.nodes,function(b){return d.is_intercepted({x:f,y:g,width:a.width,height:a.height},b)}))){a.x=f,a.y=g;break}}}return this.nodes.push(a),this._fix_collisions(a),this._pack_nodes(),this._notify(),a},f.prototype.remove_node=function(a){a._id=null,this.nodes=b.without(this.nodes,a),this._pack_nodes(),this._notify(a)},f.prototype.can_move_node=function(c,d,e,g,h){var i=Boolean(b.find(this.nodes,function(a){return a.locked}));if(!this.height&&!i)return!0;var j,k=new f(this.width,null,this["float"],0,b.map(this.nodes,function(b){return b==c?j=a.extend({},b):a.extend({},b)}));k.move_node(j,d,e,g,h);var l=!0;return i&&(l&=!Boolean(b.find(k.nodes,function(a){return a!=j&&Boolean(a.locked)&&Boolean(a._dirty)}))),this.height&&(l&=k.get_grid_height()<=this.height),l},f.prototype.can_be_placed_with_respect_to_height=function(c){if(!this.height)return!0;var d=new f(this.width,null,this["float"],0,b.map(this.nodes,function(b){return a.extend({},b)}));return d.add_node(c),d.get_grid_height()<=this.height},f.prototype.move_node=function(a,b,c,d,e,f){if("number"!=typeof b&&(b=a.x),"number"!=typeof c&&(c=a.y),"number"!=typeof d&&(d=a.width),"number"!=typeof e&&(e=a.height),"undefined"!=typeof a.max_width&&(d=Math.min(d,a.max_width)),"undefined"!=typeof a.max_height&&(e=Math.min(e,a.max_height)),"undefined"!=typeof a.min_width&&(d=Math.max(d,a.min_width)),"undefined"!=typeof a.min_height&&(e=Math.max(e,a.min_height)),a.x==b&&a.y==c&&a.width==d&&a.height==e)return a;var g=a.width!=d;return a._dirty=!0,a.x=b,a.y=c,a.width=d,a.height=e,a=this._prepare_node(a,g),this._fix_collisions(a),f||(this._pack_nodes(),this._notify()),a},f.prototype.get_grid_height=function(){return b.reduce(this.nodes,function(a,b){return Math.max(a,b.y+b.height)},0)},f.prototype.begin_update=function(a){b.each(this.nodes,function(a){a._orig_y=a.y}),a._updating=!0},f.prototype.end_update=function(){b.each(this.nodes,function(a){a._orig_y=a.y});var a=b.find(this.nodes,function(a){return a._updating});a&&(a._updating=!1)};var g=function(c,d){var e,g=this;d=d||{},this.container=a(c),d.item_class=d.item_class||"grid-stack-item";var h=this.container.closest("."+d.item_class).size()>0;if(this.opts=b.defaults(d||{},{width:parseInt(this.container.attr("data-gs-width"))||12,height:parseInt(this.container.attr("data-gs-height"))||0,item_class:"grid-stack-item",placeholder_class:"grid-stack-placeholder",placeholder_text:"",handle:".grid-stack-item-content",handle_class:null,cell_height:60,vertical_margin:20,auto:!0,min_width:768,"float":!1,static_grid:!1,_class:"grid-stack-instance-"+(1e4*Math.random()).toFixed(0),animate:Boolean(this.container.attr("data-gs-animate"))||!1,always_show_resize_handle:d.always_show_resize_handle||!1,resizable:b.defaults(d.resizable||{},{autoHide:!d.always_show_resize_handle,handles:"se"}),draggable:b.defaults(d.draggable||{},{handle:(d.handle_class?"."+d.handle_class:d.handle?d.handle:"")||".grid-stack-item-content",scroll:!1,appendTo:"body"})}),this.opts.is_nested=h,this.container.addClass(this.opts._class),this._set_static_class(),h&&this.container.addClass("grid-stack-nested"),this._init_styles(),this.grid=new f(this.opts.width,function(a){var c=0;b.each(a,function(a){null==a._id?a.el.remove():(a.el.attr("data-gs-x",a.x).attr("data-gs-y",a.y).attr("data-gs-width",a.width).attr("data-gs-height",a.height),c=Math.max(c,a.y+a.height))}),g._update_styles(c+10)},this.opts["float"],this.opts.height),this.opts.auto){var i=[],j=this;this.container.children("."+this.opts.item_class+":not(."+this.opts.placeholder_class+")").each(function(b,c){c=a(c),i.push({el:c,i:parseInt(c.attr("data-gs-x"))+parseInt(c.attr("data-gs-y"))*j.opts.width})}),b.chain(i).sortBy(function(a){return a.i}).each(function(a){g._prepare_element(a.el)}).value()}this.set_animation(this.opts.animate),this.placeholder=a('
'+this.opts.placeholder_text+"
").hide(),this.container.height(this.grid.get_grid_height()*(this.opts.cell_height+this.opts.vertical_margin)-this.opts.vertical_margin),this.on_resize_handler=function(){if(g._is_one_column_mode()){if(e)return;e=!0,g.grid._sort_nodes(),b.each(g.grid.nodes,function(a){g.container.append(a.el),g.opts.static_grid||(a.no_move||a.el.draggable("disable"),a.no_resize||a.el.resizable("disable"))})}else{if(!e)return;if(e=!1,g.opts.static_grid)return;b.each(g.grid.nodes,function(a){a.no_move||a.el.draggable("enable"),a.no_resize||a.el.resizable("enable")})}},a(window).resize(this.on_resize_handler),this.on_resize_handler()};return g.prototype._trigger_change_event=function(a){var b=this.grid.get_dirty_nodes(),c=!1,d=[];b&&b.length&&(d.push(b),c=!0),(c||a===!0)&&this.container.trigger("change",d)},g.prototype._init_styles=function(){this._styles_id&&a('[data-gs-id="'+this._styles_id+'"]').remove(),this._styles_id="gridstack-style-"+(1e5*Math.random()).toFixed(),this._styles=d.create_stylesheet(this._styles_id),null!=this._styles&&(this._styles._max=0)},g.prototype._update_styles=function(a){if(null!=this._styles){var b="."+this.opts._class+" ."+this.opts.item_class;if("undefined"==typeof a&&(a=this._styles._max,this._init_styles(),this._update_container_height()),0==this._styles._max&&d.insert_css_rule(this._styles,b,"min-height: "+this.opts.cell_height+"px;",0),a>this._styles._max){for(var c=this._styles._max;a>c;++c)d.insert_css_rule(this._styles,b+'[data-gs-height="'+(c+1)+'"]',"height: "+(this.opts.cell_height*(c+1)+this.opts.vertical_margin*c)+"px;",c),d.insert_css_rule(this._styles,b+'[data-gs-min-height="'+(c+1)+'"]',"min-height: "+(this.opts.cell_height*(c+1)+this.opts.vertical_margin*c)+"px;",c),d.insert_css_rule(this._styles,b+'[data-gs-max-height="'+(c+1)+'"]',"max-height: "+(this.opts.cell_height*(c+1)+this.opts.vertical_margin*c)+"px;",c),d.insert_css_rule(this._styles,b+'[data-gs-y="'+c+'"]',"top: "+(this.opts.cell_height*c+this.opts.vertical_margin*c)+"px;",c);this._styles._max=a}}},g.prototype._update_container_height=function(){this.grid._update_counter||this.container.height(this.grid.get_grid_height()*(this.opts.cell_height+this.opts.vertical_margin)-this.opts.vertical_margin)},g.prototype._is_one_column_mode=function(){return(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=this.opts.min_width},g.prototype._prepare_element=function(c){var e=this;c=a(c),c.addClass(this.opts.item_class);var f=e.grid.add_node({x:c.attr("data-gs-x"),y:c.attr("data-gs-y"),width:c.attr("data-gs-width"),height:c.attr("data-gs-height"),max_width:c.attr("data-gs-max-width"),min_width:c.attr("data-gs-min-width"),max_height:c.attr("data-gs-max-height"),min_height:c.attr("data-gs-min-height"),auto_position:d.toBool(c.attr("data-gs-auto-position")),no_resize:d.toBool(c.attr("data-gs-no-resize")),no_move:d.toBool(c.attr("data-gs-no-move")),locked:d.toBool(c.attr("data-gs-locked")),el:c});if(c.data("_gridstack_node",f),!e.opts.static_grid){var g,h,i=function(a,b){var c,d,i=Math.round(b.position.left/g),j=Math.floor((b.position.top+h/2)/h);"drag"!=a.type&&(c=Math.round(b.size.width/g),d=Math.round(b.size.height/h)),e.grid.can_move_node(f,i,j,c,d)&&(e.grid.move_node(f,i,j,c,d),e._update_container_height())},j=function(b,d){e.container.append(e.placeholder);var i=a(this);e.grid.clean_nodes(),e.grid.begin_update(f),g=i.outerWidth()/i.attr("data-gs-width"),h=e.opts.cell_height+e.opts.vertical_margin,e.placeholder.attr("data-gs-x",i.attr("data-gs-x")).attr("data-gs-y",i.attr("data-gs-y")).attr("data-gs-width",i.attr("data-gs-width")).attr("data-gs-height",i.attr("data-gs-height")).show(),f.el=e.placeholder,c.resizable("option","minWidth",Math.round(g*(f.min_width||1))),c.resizable("option","minHeight",e.opts.cell_height*(f.min_height||1)),"resizestart"==b.type&&i.find(".grid-stack-item").trigger("resizestart")},k=function(b,c){e.placeholder.detach();var d=a(this);f.el=d,e.placeholder.hide(),d.attr("data-gs-x",f.x).attr("data-gs-y",f.y).attr("data-gs-width",f.width).attr("data-gs-height",f.height).removeAttr("style"),e._update_container_height(),e._trigger_change_event(),e.grid.end_update();var g=d.find(".grid-stack");g.length&&"resizestop"==b.type&&(g.each(function(b,c){a(c).data("gridstack").on_resize_handler()}),d.find(".grid-stack-item").trigger("resizestop"))};c.draggable(b.extend(this.opts.draggable,{containment:this.opts.is_nested?this.container.parent():null,start:j,stop:k,drag:i})).resizable(b.extend(this.opts.resizable,{start:j,stop:k,resize:i})),(f.no_move||this._is_one_column_mode())&&c.draggable("disable"),(f.no_resize||this._is_one_column_mode())&&c.resizable("disable"),c.attr("data-gs-locked",f.locked?"yes":null)}},g.prototype.set_animation=function(a){a?this.container.addClass("grid-stack-animate"):this.container.removeClass("grid-stack-animate")},g.prototype.add_widget=function(b,c,d,e,f,g){return b=a(b),"undefined"!=typeof c&&b.attr("data-gs-x",c),"undefined"!=typeof d&&b.attr("data-gs-y",d),"undefined"!=typeof e&&b.attr("data-gs-width",e),"undefined"!=typeof f&&b.attr("data-gs-height",f),"undefined"!=typeof g&&b.attr("data-gs-auto-position",g?"yes":null),this.container.append(b),this._prepare_element(b),this._update_container_height(),this._trigger_change_event(!0),b},g.prototype.make_widget=function(b){return b=a(b),this._prepare_element(b),this._update_container_height(),this._trigger_change_event(!0),b},g.prototype.will_it_fit=function(a,b,c,d,e){var f={x:a,y:b,width:c,height:d,auto_position:e};return this.grid.can_be_placed_with_respect_to_height(f)},g.prototype.remove_widget=function(b,c){c="undefined"==typeof c?!0:c,b=a(b);var d=b.data("_gridstack_node");this.grid.remove_node(d),b.removeData("_gridstack_node"),this._update_container_height(),c&&b.remove(),this._trigger_change_event(!0)},g.prototype.remove_all=function(a){b.each(this.grid.nodes,b.bind(function(b){this.remove_widget(b.el,a)},this)),this.grid.nodes=[],this._update_container_height()},g.prototype.destroy=function(){a(window).off("resize",this.on_resize_handler),this.disable(),this.container.remove(),d.remove_stylesheet(this._styles_id),this.grid&&(this.grid=null)},g.prototype.resizable=function(b,c){var d=this;return b=a(b),b.each(function(b,e){e=a(e);var f=e.data("_gridstack_node");"undefined"!=typeof f&&null!=f&&(f.no_resize=!c,f.no_resize||d._is_one_column_mode()?e.resizable("disable"):e.resizable("enable"))}),this},g.prototype.movable=function(b,c){var d=this;return b=a(b),b.each(function(b,e){e=a(e);var f=e.data("_gridstack_node");"undefined"!=typeof f&&null!=f&&(f.no_move=!c,f.no_move||d._is_one_column_mode()?(e.draggable("disable"),e.removeClass("ui-draggable-handle")):(e.draggable("enable"),e.addClass("ui-draggable-handle")))}),this},g.prototype.disable=function(){this.movable(this.container.children("."+this.opts.item_class),!1),this.resizable(this.container.children("."+this.opts.item_class),!1),this.container.trigger("disable")},g.prototype.enable=function(){this.movable(this.container.children("."+this.opts.item_class),!0),this.resizable(this.container.children("."+this.opts.item_class),!0),this.container.trigger("enable")},g.prototype.locked=function(b,c){return b=a(b),b.each(function(b,d){d=a(d);var e=d.data("_gridstack_node");"undefined"!=typeof e&&null!=e&&(e.locked=c||!1,d.attr("data-gs-locked",e.locked?"yes":null))}),this},g.prototype.min_height=function(b,c){return b=a(b),b.each(function(b,d){d=a(d);var e=d.data("_gridstack_node");"undefined"!=typeof e&&null!=e&&(isNaN(c)||(e.min_height=c||!1,d.attr("data-gs-min-height",c)))}),this},g.prototype.min_width=function(b,c){return b=a(b),b.each(function(b,d){d=a(d);var e=d.data("_gridstack_node");"undefined"!=typeof e&&null!=e&&(isNaN(c)||(e.min_width=c||!1,d.attr("data-gs-min-width",c)))}),this},g.prototype._update_element=function(b,c){b=a(b).first();var d=b.data("_gridstack_node");if("undefined"!=typeof d&&null!=d){var e=this;e.grid.clean_nodes(),e.grid.begin_update(d),c.call(this,b,d),e._update_container_height(),e._trigger_change_event(),e.grid.end_update()}},g.prototype.resize=function(a,b,c){this._update_element(a,function(a,d){b=null!=b&&"undefined"!=typeof b?b:d.width,c=null!=c&&"undefined"!=typeof c?c:d.height,this.grid.move_node(d,d.x,d.y,b,c)})},g.prototype.move=function(a,b,c){this._update_element(a,function(a,d){b=null!=b&&"undefined"!=typeof b?b:d.x,c=null!=c&&"undefined"!=typeof c?c:d.y,this.grid.move_node(d,b,c,d.width,d.height)})},g.prototype.update=function(a,b,c,d,e){this._update_element(a,function(a,f){b=null!=b&&"undefined"!=typeof b?b:f.x,c=null!=c&&"undefined"!=typeof c?c:f.y,d=null!=d&&"undefined"!=typeof d?d:f.width,e=null!=e&&"undefined"!=typeof e?e:f.height,this.grid.move_node(f,b,c,d,e)})},g.prototype.cell_height=function(a){return"undefined"==typeof a?this.opts.cell_height:(a=parseInt(a),void(a!=this.opts.cell_height&&(this.opts.cell_height=a||this.opts.cell_height,this._update_styles())))},g.prototype.cell_width=function(){var a=this.container.children("."+this.opts.item_class).first();return Math.ceil(a.outerWidth()/a.attr("data-gs-width"))},g.prototype.get_cell_from_pixel=function(a){var b=this.container.position(),c=a.left-b.left,d=a.top-b.top,e=Math.floor(this.container.width()/this.opts.width),f=this.opts.cell_height+this.opts.vertical_margin;return{x:Math.floor(c/e),y:Math.floor(d/f)}},g.prototype.batch_update=function(){this.grid.batch_update()},g.prototype.commit=function(){this.grid.commit(),this._update_container_height()},g.prototype.is_area_empty=function(a,b,c,d){return this.grid.is_area_empty(a,b,c,d)},g.prototype.set_static=function(a){this.opts.static_grid=a===!0,this._set_static_class()},g.prototype._set_static_class=function(){var a="grid-stack-static";this.opts.static_grid===!0?this.container.addClass(a):this.container.removeClass(a)},c.GridStackUI=g,c.GridStackUI.Utils=d,a.fn.gridstack=function(b){return this.each(function(){var c=a(this);c.data("gridstack")||c.data("gridstack",new g(this,b))})},c.GridStackUI});
+!function(a){if("function"==typeof define&&define.amd)define(["jquery","lodash","jquery-ui/core","jquery-ui/widget","jquery-ui/mouse","jquery-ui/draggable","jquery-ui/resizable"],a);else if("undefined"!=typeof exports){try{jQuery=require("jquery")}catch(b){}try{_=require("lodash")}catch(b){}a(jQuery,_)}else a(jQuery,_)}(function(a,b){function c(a){var c=a,d="px";if(c&&b.isString(c)){var e=c.match(/^([0-9]+)(px|em|rem)?$/);if(!e)throw new Error("Invalid height");d=e[2],c=parseInt(e[1])}return{height:c,unit:d}}var d=window,e={is_intercepted:function(a,b){return!(a.x+a.width<=b.x||b.x+b.width<=a.x||a.y+a.height<=b.y||b.y+b.height<=a.y)},sort:function(a,c,d){return d=d||b.chain(a).map(function(a){return a.x+a.width}).max().value(),c=-1!=c?1:-1,b.sortBy(a,function(a){return c*(a.x+a.y*d)})},create_stylesheet:function(a){var b=document.createElement("style");return b.setAttribute("type","text/css"),b.setAttribute("data-gs-id",a),b.styleSheet?b.styleSheet.cssText="":b.appendChild(document.createTextNode("")),document.getElementsByTagName("head")[0].appendChild(b),b.sheet},remove_stylesheet:function(b){a("STYLE[data-gs-id="+b+"]").remove()},insert_css_rule:function(a,b,c,d){"function"==typeof a.insertRule?a.insertRule(b+"{"+c+"}",d):"function"==typeof a.addRule&&a.addRule(b,c,d)},toBool:function(a){return"boolean"==typeof a?a:"string"==typeof a?(a=a.toLowerCase(),!(""==a||"no"==a||"false"==a||"0"==a)):Boolean(a)}},f=0,g=function(a,b,c,d,e){this.width=a,this["float"]=c||!1,this.height=d||0,this.nodes=e||[],this.onchange=b||function(){},this._update_counter=0,this._float=this["float"]};g.prototype.batch_update=function(){this._update_counter=1,this["float"]=!0},g.prototype.commit=function(){this._update_counter=0,0==this._update_counter&&(this["float"]=this._float,this._pack_nodes(),this._notify())},g.prototype._fix_collisions=function(a){this._sort_nodes(-1);var c=a,d=Boolean(b.find(this.nodes,function(a){return a.locked}));for(this["float"]||d||(c={x:0,y:a.y,width:this.width,height:a.height});;){var f=b.find(this.nodes,b.bind(function(b){return b!=a&&e.is_intercepted(b,c)},this));if("undefined"==typeof f)return;this.move_node(f,f.x,a.y+a.height,f.width,f.height,!0)}},g.prototype.is_area_empty=function(a,c,d,f){var g={x:a||0,y:c||0,width:d||1,height:f||1},h=b.find(this.nodes,b.bind(function(a){return e.is_intercepted(a,g)},this));return null==h},g.prototype._sort_nodes=function(a){this.nodes=e.sort(this.nodes,a,this.width)},g.prototype._pack_nodes=function(){this._sort_nodes(),this["float"]?b.each(this.nodes,b.bind(function(a,c){if(!a._updating&&"undefined"!=typeof a._orig_y&&a.y!=a._orig_y)for(var d=a.y;d>=a._orig_y;){var f=b.chain(this.nodes).find(function(b){return a!=b&&e.is_intercepted({x:a.x,y:d,width:a.width,height:a.height},b)}).value();f||(a._dirty=!0,a.y=d),--d}},this)):b.each(this.nodes,b.bind(function(a,c){if(!a.locked)for(;a.y>0;){var d=a.y-1,f=0==c;if(c>0){var g=b.chain(this.nodes).take(c).find(function(b){return e.is_intercepted({x:a.x,y:d,width:a.width,height:a.height},b)}).value();f="undefined"==typeof g}if(!f)break;a._dirty=a.y!=d,a.y=d}},this))},g.prototype._prepare_node=function(a,c){return a=b.defaults(a||{},{width:1,height:1,x:0,y:0}),a.x=parseInt(""+a.x),a.y=parseInt(""+a.y),a.width=parseInt(""+a.width),a.height=parseInt(""+a.height),a.auto_position=a.auto_position||!1,a.no_resize=a.no_resize||!1,a.no_move=a.no_move||!1,a.width>this.width?a.width=this.width:a.width<1&&(a.width=1),a.height<1&&(a.height=1),a.x<0&&(a.x=0),a.x+a.width>this.width&&(c?a.width=this.width-a.x:a.x=this.width-a.width),a.y<0&&(a.y=0),a},g.prototype._notify=function(){if(!this._update_counter){var a=Array.prototype.slice.call(arguments,1).concat(this.get_dirty_nodes());a=a.concat(this.get_dirty_nodes()),this.onchange(a)}},g.prototype.clean_nodes=function(){b.each(this.nodes,function(a){a._dirty=!1})},g.prototype.get_dirty_nodes=function(){return b.filter(this.nodes,function(a){return a._dirty})},g.prototype.add_node=function(a){if(a=this._prepare_node(a),"undefined"!=typeof a.max_width&&(a.width=Math.min(a.width,a.max_width)),"undefined"!=typeof a.max_height&&(a.height=Math.min(a.height,a.max_height)),"undefined"!=typeof a.min_width&&(a.width=Math.max(a.width,a.min_width)),"undefined"!=typeof a.min_height&&(a.height=Math.max(a.height,a.min_height)),a._id=++f,a._dirty=!0,a.auto_position){this._sort_nodes();for(var c=0;;++c){var d=c%this.width,g=Math.floor(c/this.width);if(!(d+a.width>this.width||b.find(this.nodes,function(b){return e.is_intercepted({x:d,y:g,width:a.width,height:a.height},b)}))){a.x=d,a.y=g;break}}}return this.nodes.push(a),this._fix_collisions(a),this._pack_nodes(),this._notify(),a},g.prototype.remove_node=function(a){a._id=null,this.nodes=b.without(this.nodes,a),this._pack_nodes(),this._notify(a)},g.prototype.can_move_node=function(c,d,e,f,h){var i=Boolean(b.find(this.nodes,function(a){return a.locked}));if(!this.height&&!i)return!0;var j,k=new g(this.width,null,this["float"],0,b.map(this.nodes,function(b){return b==c?j=a.extend({},b):a.extend({},b)}));k.move_node(j,d,e,f,h);var l=!0;return i&&(l&=!Boolean(b.find(k.nodes,function(a){return a!=j&&Boolean(a.locked)&&Boolean(a._dirty)}))),this.height&&(l&=k.get_grid_height()<=this.height),l},g.prototype.can_be_placed_with_respect_to_height=function(c){if(!this.height)return!0;var d=new g(this.width,null,this["float"],0,b.map(this.nodes,function(b){return a.extend({},b)}));return d.add_node(c),d.get_grid_height()<=this.height},g.prototype.move_node=function(a,b,c,d,e,f){if("number"!=typeof b&&(b=a.x),"number"!=typeof c&&(c=a.y),"number"!=typeof d&&(d=a.width),"number"!=typeof e&&(e=a.height),"undefined"!=typeof a.max_width&&(d=Math.min(d,a.max_width)),"undefined"!=typeof a.max_height&&(e=Math.min(e,a.max_height)),"undefined"!=typeof a.min_width&&(d=Math.max(d,a.min_width)),"undefined"!=typeof a.min_height&&(e=Math.max(e,a.min_height)),a.x==b&&a.y==c&&a.width==d&&a.height==e)return a;var g=a.width!=d;return a._dirty=!0,a.x=b,a.y=c,a.width=d,a.height=e,a=this._prepare_node(a,g),this._fix_collisions(a),f||(this._pack_nodes(),this._notify()),a},g.prototype.get_grid_height=function(){return b.reduce(this.nodes,function(a,b){return Math.max(a,b.y+b.height)},0)},g.prototype.begin_update=function(a){b.each(this.nodes,function(a){a._orig_y=a.y}),a._updating=!0},g.prototype.end_update=function(){b.each(this.nodes,function(a){a._orig_y=a.y});var a=b.find(this.nodes,function(a){return a._updating});a&&(a._updating=!1)};var h=function(c,d){var e,f=this;d=d||{},this.container=a(c),d.item_class=d.item_class||"grid-stack-item";var h=this.container.closest("."+d.item_class).size()>0;if(this.opts=b.defaults(d||{},{width:parseInt(this.container.attr("data-gs-width"))||12,height:parseInt(this.container.attr("data-gs-height"))||0,item_class:"grid-stack-item",placeholder_class:"grid-stack-placeholder",placeholder_text:"",handle:".grid-stack-item-content",handle_class:null,cell_height:60,vertical_margin:20,auto:!0,min_width:768,"float":!1,static_grid:!1,_class:"grid-stack-instance-"+(1e4*Math.random()).toFixed(0),animate:Boolean(this.container.attr("data-gs-animate"))||!1,always_show_resize_handle:d.always_show_resize_handle||!1,resizable:b.defaults(d.resizable||{},{autoHide:!d.always_show_resize_handle,handles:"se"}),draggable:b.defaults(d.draggable||{},{handle:(d.handle_class?"."+d.handle_class:d.handle?d.handle:"")||".grid-stack-item-content",scroll:!1,appendTo:"body"})}),this.opts.is_nested=h,this.cell_height(this.opts.cell_height,!0),this.vertical_margin(this.opts.vertical_margin,!0),this.container.addClass(this.opts._class),this._set_static_class(),h&&this.container.addClass("grid-stack-nested"),this._init_styles(),this.grid=new g(this.opts.width,function(a){var c=0;b.each(a,function(a){null==a._id?a.el.remove():(a.el.attr("data-gs-x",a.x).attr("data-gs-y",a.y).attr("data-gs-width",a.width).attr("data-gs-height",a.height),c=Math.max(c,a.y+a.height))}),f._update_styles(c+10)},this.opts["float"],this.opts.height),this.opts.auto){var i=[],j=this;this.container.children("."+this.opts.item_class+":not(."+this.opts.placeholder_class+")").each(function(b,c){c=a(c),i.push({el:c,i:parseInt(c.attr("data-gs-x"))+parseInt(c.attr("data-gs-y"))*j.opts.width})}),b.chain(i).sortBy(function(a){return a.i}).each(function(a){f._prepare_element(a.el)}).value()}this.set_animation(this.opts.animate),this.placeholder=a('
'+this.opts.placeholder_text+"
").hide(),this._update_container_height(),this.on_resize_handler=function(){if(f._is_one_column_mode()){if(e)return;e=!0,f.grid._sort_nodes(),b.each(f.grid.nodes,function(a){f.container.append(a.el),f.opts.static_grid||(a.no_move||a.el.draggable("disable"),a.no_resize||a.el.resizable("disable"))})}else{if(!e)return;if(e=!1,f.opts.static_grid)return;b.each(f.grid.nodes,function(a){a.no_move||a.el.draggable("enable"),a.no_resize||a.el.resizable("enable")})}},a(window).resize(this.on_resize_handler),this.on_resize_handler()};return h.prototype._trigger_change_event=function(a){var b=this.grid.get_dirty_nodes(),c=!1,d=[];b&&b.length&&(d.push(b),c=!0),(c||a===!0)&&this.container.trigger("change",d)},h.prototype._init_styles=function(){this.opts.cell_height&&(this._styles_id&&a('[data-gs-id="'+this._styles_id+'"]').remove(),this._styles_id="gridstack-style-"+(1e5*Math.random()).toFixed(),this._styles=e.create_stylesheet(this._styles_id),null!=this._styles&&(this._styles._max=0))},h.prototype._update_styles=function(a){if(null!=this._styles){var b,c="."+this.opts._class+" ."+this.opts.item_class,d=this;if("undefined"==typeof a&&(a=this._styles._max,this._init_styles(),this._update_container_height()),this.opts.cell_height&&!(0!==this._styles._max&&a<=this._styles._max)&&(b=this.opts.vertical_margin&&this.opts.cell_height_unit!==this.opts.vertical_margin_unit?function(a,b){return a&&b?"calc("+(d.opts.cell_height*a+d.opts.cell_height_unit)+" + "+(d.opts.vertical_margin*b+d.opts.vertical_margin_unit)+")":d.opts.cell_height*a+d.opts.vertical_margin*b+d.opts.cell_height_unit}:function(a,b){return d.opts.cell_height*a+d.opts.vertical_margin*b+d.opts.cell_height_unit},0==this._styles._max&&e.insert_css_rule(this._styles,c,"min-height: "+b(1,0)+";",0),a>this._styles._max)){for(var f=this._styles._max;a>f;++f)e.insert_css_rule(this._styles,c+'[data-gs-height="'+(f+1)+'"]',"height: "+b(f+1,f)+";",f),e.insert_css_rule(this._styles,c+'[data-gs-min-height="'+(f+1)+'"]',"min-height: "+b(f+1,f)+";",f),e.insert_css_rule(this._styles,c+'[data-gs-max-height="'+(f+1)+'"]',"max-height: "+b(f+1,f)+";",f),e.insert_css_rule(this._styles,c+'[data-gs-y="'+f+'"]',"top: "+b(f,f)+";",f);this._styles._max=a}}},h.prototype._update_container_height=function(){if(!this.grid._update_counter){var a=this.grid.get_grid_height();this.container.attr("data-gs-current-height",a),this.opts.cell_height&&(this.opts.vertical_margin?this.opts.cell_height_unit===this.opts.vertical_margin_unit?this.container.css("height",a*(this.opts.cell_height+this.opts.vertical_margin)-this.opts.vertical_margin+this.opts.cell_height_unit):this.container.css("height","calc("+(a*this.opts.cell_height+this.opts.cell_height_unit)+" + "+(a*(this.opts.vertical_margin-1)+this.opts.vertical_margin_unit)+")"):this.container.css("height",a*this.opts.cell_height+this.opts.cell_height_unit))}},h.prototype._is_one_column_mode=function(){return(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=this.opts.min_width},h.prototype._prepare_element=function(c){var d=this;c=a(c),c.addClass(this.opts.item_class);var f=d.grid.add_node({x:c.attr("data-gs-x"),y:c.attr("data-gs-y"),width:c.attr("data-gs-width"),height:c.attr("data-gs-height"),max_width:c.attr("data-gs-max-width"),min_width:c.attr("data-gs-min-width"),max_height:c.attr("data-gs-max-height"),min_height:c.attr("data-gs-min-height"),auto_position:e.toBool(c.attr("data-gs-auto-position")),no_resize:e.toBool(c.attr("data-gs-no-resize")),no_move:e.toBool(c.attr("data-gs-no-move")),locked:e.toBool(c.attr("data-gs-locked")),el:c});if(c.data("_gridstack_node",f),!d.opts.static_grid){var g,h,i=function(a,b){var c,e,i=Math.round(b.position.left/g),j=Math.floor((b.position.top+h/2)/h);"drag"!=a.type&&(c=Math.round(b.size.width/g),e=Math.round(b.size.height/h)),d.grid.can_move_node(f,i,j,c,e)&&(d.grid.move_node(f,i,j,c,e),d._update_container_height())},j=function(b,e){d.container.append(d.placeholder);var i=a(this);d.grid.clean_nodes(),d.grid.begin_update(f),g=Math.ceil(i.outerWidth()/i.attr("data-gs-width"));var j=Math.ceil(i.outerHeight()/i.attr("data-gs-height"));h=d.container.height()/parseInt(d.container.attr("data-gs-current-height")),d.placeholder.attr("data-gs-x",i.attr("data-gs-x")).attr("data-gs-y",i.attr("data-gs-y")).attr("data-gs-width",i.attr("data-gs-width")).attr("data-gs-height",i.attr("data-gs-height")).show(),f.el=d.placeholder,c.resizable("option","minWidth",g*(f.min_width||1)),c.resizable("option","minHeight",j*(f.min_height||1)),"resizestart"==b.type&&i.find(".grid-stack-item").trigger("resizestart")},k=function(b,c){d.placeholder.detach();var e=a(this);f.el=e,d.placeholder.hide(),e.attr("data-gs-x",f.x).attr("data-gs-y",f.y).attr("data-gs-width",f.width).attr("data-gs-height",f.height).removeAttr("style"),d._update_container_height(),d._trigger_change_event(),d.grid.end_update();var g=e.find(".grid-stack");g.length&&"resizestop"==b.type&&(g.each(function(b,c){a(c).data("gridstack").on_resize_handler()}),e.find(".grid-stack-item").trigger("resizestop"))};c.draggable(b.extend(this.opts.draggable,{containment:this.opts.is_nested?this.container.parent():null,start:j,stop:k,drag:i})).resizable(b.extend(this.opts.resizable,{start:j,stop:k,resize:i})),(f.no_move||this._is_one_column_mode())&&c.draggable("disable"),(f.no_resize||this._is_one_column_mode())&&c.resizable("disable"),c.attr("data-gs-locked",f.locked?"yes":null)}},h.prototype.set_animation=function(a){a?this.container.addClass("grid-stack-animate"):this.container.removeClass("grid-stack-animate")},h.prototype.add_widget=function(b,c,d,e,f,g){return b=a(b),"undefined"!=typeof c&&b.attr("data-gs-x",c),"undefined"!=typeof d&&b.attr("data-gs-y",d),"undefined"!=typeof e&&b.attr("data-gs-width",e),"undefined"!=typeof f&&b.attr("data-gs-height",f),"undefined"!=typeof g&&b.attr("data-gs-auto-position",g?"yes":null),this.container.append(b),this._prepare_element(b),this._update_container_height(),this._trigger_change_event(!0),b},h.prototype.make_widget=function(b){return b=a(b),this._prepare_element(b),this._update_container_height(),this._trigger_change_event(!0),b},h.prototype.will_it_fit=function(a,b,c,d,e){var f={x:a,y:b,width:c,height:d,auto_position:e};return this.grid.can_be_placed_with_respect_to_height(f)},h.prototype.remove_widget=function(b,c){c="undefined"==typeof c?!0:c,b=a(b);var d=b.data("_gridstack_node");this.grid.remove_node(d),b.removeData("_gridstack_node"),this._update_container_height(),c&&b.remove(),this._trigger_change_event(!0)},h.prototype.remove_all=function(a){b.each(this.grid.nodes,b.bind(function(b){this.remove_widget(b.el,a)},this)),this.grid.nodes=[],this._update_container_height()},h.prototype.destroy=function(){a(window).off("resize",this.on_resize_handler),this.disable(),this.container.remove(),e.remove_stylesheet(this._styles_id),this.grid&&(this.grid=null)},h.prototype.resizable=function(b,c){var d=this;return b=a(b),b.each(function(b,e){e=a(e);var f=e.data("_gridstack_node");"undefined"!=typeof f&&null!=f&&(f.no_resize=!c,f.no_resize||d._is_one_column_mode()?e.resizable("disable"):e.resizable("enable"))}),this},h.prototype.movable=function(b,c){var d=this;return b=a(b),b.each(function(b,e){e=a(e);var f=e.data("_gridstack_node");"undefined"!=typeof f&&null!=f&&(f.no_move=!c,f.no_move||d._is_one_column_mode()?(e.draggable("disable"),e.removeClass("ui-draggable-handle")):(e.draggable("enable"),e.addClass("ui-draggable-handle")))}),this},h.prototype.disable=function(){this.movable(this.container.children("."+this.opts.item_class),!1),this.resizable(this.container.children("."+this.opts.item_class),!1),this.container.trigger("disable")},h.prototype.enable=function(){this.movable(this.container.children("."+this.opts.item_class),!0),this.resizable(this.container.children("."+this.opts.item_class),!0),this.container.trigger("enable")},h.prototype.locked=function(b,c){return b=a(b),b.each(function(b,d){d=a(d);var e=d.data("_gridstack_node");"undefined"!=typeof e&&null!=e&&(e.locked=c||!1,d.attr("data-gs-locked",e.locked?"yes":null))}),this},h.prototype.min_height=function(b,c){return b=a(b),b.each(function(b,d){d=a(d);var e=d.data("_gridstack_node");"undefined"!=typeof e&&null!=e&&(isNaN(c)||(e.min_height=c||!1,d.attr("data-gs-min-height",c)))}),this},h.prototype.min_width=function(b,c){return b=a(b),b.each(function(b,d){d=a(d);var e=d.data("_gridstack_node");"undefined"!=typeof e&&null!=e&&(isNaN(c)||(e.min_width=c||!1,d.attr("data-gs-min-width",c)))}),this},h.prototype._update_element=function(b,c){b=a(b).first();var d=b.data("_gridstack_node");if("undefined"!=typeof d&&null!=d){var e=this;e.grid.clean_nodes(),e.grid.begin_update(d),c.call(this,b,d),e._update_container_height(),e._trigger_change_event(),e.grid.end_update()}},h.prototype.resize=function(a,b,c){this._update_element(a,function(a,d){b=null!=b&&"undefined"!=typeof b?b:d.width,c=null!=c&&"undefined"!=typeof c?c:d.height,this.grid.move_node(d,d.x,d.y,b,c)})},h.prototype.move=function(a,b,c){this._update_element(a,function(a,d){b=null!=b&&"undefined"!=typeof b?b:d.x,c=null!=c&&"undefined"!=typeof c?c:d.y,this.grid.move_node(d,b,c,d.width,d.height)})},h.prototype.update=function(a,b,c,d,e){this._update_element(a,function(a,f){b=null!=b&&"undefined"!=typeof b?b:f.x,c=null!=c&&"undefined"!=typeof c?c:f.y,d=null!=d&&"undefined"!=typeof d?d:f.width,e=null!=e&&"undefined"!=typeof e?e:f.height,this.grid.move_node(f,b,c,d,e)})},h.prototype.vertical_margin=function(a,b){if("undefined"==typeof a)return this.opts.vertical_margin;var d=c(a);(this.opts.vertical_margin_unit!==d.unit||this.opts.height!==d.height)&&(this.opts.vertical_margin_unit=d.unit,this.opts.vertical_margin=d.height,b||this._update_styles())},h.prototype.cell_height=function(a,b){if("undefined"==typeof a){if(this.opts.cell_height)return this.opts.cell_height;var d=this.container.children("."+this.opts.item_class).first();return Math.ceil(d.outerHeight()/d.attr("data-gs-height"))}var e=c(a);(this.opts.cell_height_unit!==e.height_unit||this.opts.height!==e.height)&&(this.opts.cell_height_unit=e.unit,this.opts.cell_height=e.height,b||this._update_styles())},h.prototype.cell_width=function(){var a=this.container.children("."+this.opts.item_class).first();return Math.ceil(a.outerWidth()/a.attr("data-gs-width"))},h.prototype.get_cell_from_pixel=function(a){var b=this.container.position(),c=a.left-b.left,d=a.top-b.top,e=Math.floor(this.container.width()/this.opts.width),f=Math.floor(this.container.height()/parseInt(this.container.attr("data-gs-current-height")));return{x:Math.floor(c/e),y:Math.floor(d/f)}},h.prototype.batch_update=function(){this.grid.batch_update()},h.prototype.commit=function(){this.grid.commit(),this._update_container_height()},h.prototype.is_area_empty=function(a,b,c,d){return this.grid.is_area_empty(a,b,c,d)},h.prototype.set_static=function(a){this.opts.static_grid=a===!0,this._set_static_class()},h.prototype._set_static_class=function(){var a="grid-stack-static";this.opts.static_grid===!0?this.container.addClass(a):this.container.removeClass(a)},d.GridStackUI=h,d.GridStackUI.Utils=e,a.fn.gridstack=function(b){return this.each(function(){var c=a(this);c.data("gridstack")||c.data("gridstack",new h(this,b))})},d.GridStackUI});
//# sourceMappingURL=gridstack.min.map
\ No newline at end of file
diff --git a/dist/gridstack.min.map b/dist/gridstack.min.map
index 5e0b05c..44d7f2f 100644
--- a/dist/gridstack.min.map
+++ b/dist/gridstack.min.map
@@ -1 +1 @@
-{"version":3,"sources":["../src/gridstack.js"],"names":["factory","define","amd","exports","jQuery","require","e","_","$","scope","window","Utils","is_intercepted","a","b","x","width","y","height","sort","nodes","dir","chain","map","node","max","value","sortBy","n","create_stylesheet","id","style","document","createElement","setAttribute","styleSheet","cssText","appendChild","createTextNode","getElementsByTagName","sheet","remove_stylesheet","remove","insert_css_rule","selector","rules","index","insertRule","addRule","toBool","v","toLowerCase","Boolean","id_seq","GridStackEngine","onchange","float_mode","items","this","_update_counter","_float","prototype","batch_update","commit","_pack_nodes","_notify","_fix_collisions","_sort_nodes","nn","has_locked","find","locked","collision_node","bind","move_node","is_area_empty","each","i","_updating","_orig_y","new_y","bn","_dirty","can_be_moved","take","_prepare_node","resizing","defaults","parseInt","auto_position","no_resize","no_move","deleted_nodes","Array","slice","call","arguments","concat","get_dirty_nodes","clean_nodes","filter","add_node","max_width","Math","min","max_height","min_width","min_height","_id","floor","push","remove_node","without","can_move_node","cloned_node","clone","extend","res","get_grid_height","can_be_placed_with_respect_to_height","no_pack","reduce","memo","begin_update","end_update","GridStack","el","opts","one_column_mode","self","container","item_class","is_nested","closest","size","attr","placeholder_class","placeholder_text","handle","handle_class","cell_height","vertical_margin","auto","float","static_grid","_class","random","toFixed","animate","always_show_resize_handle","resizable","autoHide","handles","draggable","scroll","appendTo","addClass","_set_static_class","_init_styles","grid","_update_styles","elements","_this","children","_prepare_element","set_animation","placeholder","hide","on_resize_handler","_is_one_column_mode","append","resize","_trigger_change_event","forceTrigger","hasChanges","eventParams","length","trigger","_styles_id","_styles","_max","prefix","_update_container_height","innerWidth","documentElement","clientWidth","body","data","cell_width","drag_or_resize","event","ui","round","position","left","top","type","on_start_moving","o","outerWidth","show","on_end_moving","detach","removeAttr","nested_grids","containment","parent","start","stop","drag","enable","removeClass","add_widget","make_widget","will_it_fit","remove_widget","detach_node","removeData","remove_all","destroy","off","disable","val","movable","isNaN","_update_element","callback","first","move","update","ceil","get_cell_from_pixel","containerPos","relativeLeft","relativeTop","column_width","row_height","set_static","static_value","static_class_name","GridStackUI","fn","gridstack"],"mappings":";;;;;;;CAOA,SAAUA,GACN,GAAsB,kBAAXC,SAAyBA,OAAOC,IACvCD,QAAQ,SAAU,SAAU,iBAAkB,mBAAoB,kBAAmB,sBACjF,uBAAwBD,OAE3B,IAAuB,mBAAZG,SAAyB,CACvC,IAAMC,OAASC,QAAQ,UAAa,MAAMC,IAC1C,IAAMC,EAAIF,QAAQ,UAAa,MAAMC,IACrCN,EAAQI,OAAQG,OAGdP,GAAQI,OAAQG,IAErB,SAASC,EAAGD,GAEX,GAAIE,GAAQC,OAERC,GACAC,eAAgB,SAASC,EAAGC,GACxB,QAASD,EAAEE,EAAIF,EAAEG,OAASF,EAAEC,GAAKD,EAAEC,EAAID,EAAEE,OAASH,EAAEE,GAAKF,EAAEI,EAAIJ,EAAEK,QAAUJ,EAAEG,GAAKH,EAAEG,EAAIH,EAAEI,QAAUL,EAAEI,IAG1GE,KAAM,SAASC,EAAOC,EAAKL,GAGvB,MAFAA,GAAQA,GAAST,EAAEe,MAAMF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AAQA,EAE1BH,EAAEyO,GAAGC,UAAY,SAASnH,GACtB,MAAOrE,MAAKkB,KAAK,WACb,GAAI0H,GAAI9L,EAAEkD,KACL4I,GAAEX,KAAK,cACRW,EACKX,KAAK,YAAa,GAAI9D,GAAUnE,KAAMqE,OAKhDtH,EAAMuO","file":"gridstack.min.js"}
\ No newline at end of file
+{"version":3,"sources":["../src/gridstack.js"],"names":["factory","define","amd","exports","jQuery","require","e","_","$","parseHeight","val","height","height_unit","isString","match","Error","parseInt","unit","scope","window","Utils","is_intercepted","a","b","x","width","y","sort","nodes","dir","chain","map","node","max","value","sortBy","n","create_stylesheet","id","style","document","createElement","setAttribute","styleSheet","cssText","appendChild","createTextNode","getElementsByTagName","sheet","remove_stylesheet","remove","insert_css_rule","selector","rules","index","insertRule","addRule","toBool","v","toLowerCase","Boolean","id_seq","GridStackEngine","onchange","float_mode","items","this","_update_counter","_float","prototype","batch_update","commit","_pack_nodes","_notify","_fix_collisions","_sort_nodes","nn","has_locked","find","locked","collision_node","bind","move_node","is_area_empty","each","i","_updating","_orig_y","new_y","bn","_dirty","can_be_moved","take","_prepare_node","resizing","defaults","auto_position","no_resize","no_move","deleted_nodes","Array","slice","call","arguments","concat","get_dirty_nodes","clean_nodes","filter","add_node","max_width","Math","min","max_height","min_width","min_height","_id","floor","push","remove_node","without","can_move_node","cloned_node","clone","extend","res","get_grid_height","can_be_placed_with_respect_to_height","no_pack","reduce","memo","begin_update","end_update","GridStack","el","opts","one_column_mode","self","container","item_class","is_nested","closest","size","attr","placeholder_class","placeholder_text","handle","handle_class","cell_height","vertical_margin","auto","float","static_grid","_class","random","toFixed","animate","always_show_resize_handle","resizable","autoHide","handles","draggable","scroll","appendTo","addClass","_set_static_class","_init_styles","grid","_update_styles","elements","_this","children","_prepare_element","set_animation","placeholder","hide","_update_container_height","on_resize_handler","_is_one_column_mode","append","resize","_trigger_change_event","forceTrigger","hasChanges","eventParams","length","trigger","_styles_id","_styles","_max","get_height","prefix","cell_height_unit","vertical_margin_unit","nbRows","nbMargins","css","innerWidth","documentElement","clientWidth","body","data","cell_width","drag_or_resize","event","ui","round","position","left","top","type","on_start_moving","o","ceil","outerWidth","strict_cell_height","outerHeight","show","on_end_moving","detach","removeAttr","nested_grids","containment","parent","start","stop","drag","enable","removeClass","add_widget","make_widget","will_it_fit","remove_widget","detach_node","removeData","remove_all","destroy","off","disable","movable","isNaN","_update_element","callback","first","move","update","noUpdate","heightData","get_cell_from_pixel","containerPos","relativeLeft","relativeTop","column_width","row_height","set_static","static_value","static_class_name","GridStackUI","fn","gridstack"],"mappings":";;;;;;;CAOA,SAAUA,GACN,GAAsB,kBAAXC,SAAyBA,OAAOC,IACvCD,QAAQ,SAAU,SAAU,iBAAkB,mBAAoB,kBAAmB,sBACjF,uBAAwBD,OAE3B,IAAuB,mBAAZG,SAAyB,CACvC,IAAMC,OAASC,QAAQ,UAAa,MAAMC,IAC1C,IAAMC,EAAIF,QAAQ,UAAa,MAAMC,IACrCN,EAAQI,OAAQG,OAGdP,GAAQI,OAAQG,IAErB,SAASC,EAAGD,GAs8BX,QAASE,GAAYC,GACjB,GAAIC,GAASD,EACTE,EAAc,IAClB,IAAID,GAAUJ,EAAEM,SAASF,GAAS,CAC9B,GAAIG,GAAQH,EAAOG,MAAM,yBACzB,KAAKA,EACD,KAAM,IAAIC,OAAM,iBAEpBH,GAAcE,EAAM,GACpBH,EAASK,SAASF,EAAM,IAE5B,OAAQH,OAAQA,EAAQM,KAAML,GA/8BlC,GAAIM,GAAQC,OAERC,GACAC,eAAgB,SAASC,EAAGC,GACxB,QAASD,EAAEE,EAAIF,EAAEG,OAASF,EAAEC,GAAKD,EAAEC,EAAID,EAAEE,OAASH,EAAEE,GAAKF,EAAEI,EAAIJ,EAAEX,QAAUY,EAAEG,GAAKH,EAAEG,EAAIH,EAAEZ,QAAUW,EAAEI,IAG1GC,KAAM,SAASC,EAAOC,EAAKJ,GAGvB,MAFAA,GAAQA,GAASlB,EAAEuB,MAAMF,GAAO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