This commit is contained in:
Pavel Reznikov 2015-07-31 18:07:44 -07:00
commit 5bbd8d5f54
4 changed files with 21 additions and 3 deletions

View file

@ -45,7 +45,7 @@ Inspired by [gridster.js](http://gridster.net). Built with love.
- [remove_all()](#remove_all)
- [resize(el, width, height)](#resizeel-width-height)
- [resizable(el, val)](#resizableel-val)
- [set_static(val)](#set_staticstatic_value)
- [set_static(static_value)](#set_staticstatic_value)
- [update(el, x, y, width, height)](#updateel-x-y-width-height)
- [will_it_fit(x, y, width, height, auto_position)](#will_it_fitx-y-width-height-auto_position)
- [Utils](#utils)

18
dist/gridstack.js vendored
View file

@ -416,6 +416,9 @@
this.opts.is_nested = is_nested;
this.container.addClass(this.opts._class);
this._set_static_class();
if (is_nested) {
this.container.addClass('grid-stack-nested');
}
@ -946,6 +949,21 @@
return this.grid.is_area_empty(x, y, width, height);
};
GridStack.prototype.set_static = function(static_value) {
this.opts.static_grid = (static_value === true);
this._set_static_class();
};
GridStack.prototype._set_static_class = function() {
var static_class_name = 'grid-stack-static';
if (this.opts.static_grid === true) {
this.container.addClass(static_class_name);
} else {
this.container.removeClass(static_class_name);
}
};
scope.GridStackUI = GridStack;
scope.GridStackUI.Utils = Utils;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long