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

Skip to content

Commit 5bbd8d5

Browse files
committed
build js
1 parent f7e0415 commit 5bbd8d5

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Inspired by [gridster.js](http://gridster.net). Built with love.
4545
- [remove_all()](#remove_all)
4646
- [resize(el, width, height)](#resizeel-width-height)
4747
- [resizable(el, val)](#resizableel-val)
48-
- [set_static(val)](#set_staticstatic_value)
48+
- [set_static(static_value)](#set_staticstatic_value)
4949
- [update(el, x, y, width, height)](#updateel-x-y-width-height)
5050
- [will_it_fit(x, y, width, height, auto_position)](#will_it_fitx-y-width-height-auto_position)
5151
- [Utils](#utils)

dist/gridstack.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@
416416
this.opts.is_nested = is_nested;
417417

418418
this.container.addClass(this.opts._class);
419+
420+
this._set_static_class();
421+
419422
if (is_nested) {
420423
this.container.addClass('grid-stack-nested');
421424
}
@@ -946,6 +949,21 @@
946949
return this.grid.is_area_empty(x, y, width, height);
947950
};
948951

952+
GridStack.prototype.set_static = function(static_value) {
953+
this.opts.static_grid = (static_value === true);
954+
this._set_static_class();
955+
};
956+
957+
GridStack.prototype._set_static_class = function() {
958+
var static_class_name = 'grid-stack-static';
959+
960+
if (this.opts.static_grid === true) {
961+
this.container.addClass(static_class_name);
962+
} else {
963+
this.container.removeClass(static_class_name);
964+
}
965+
};
966+
949967
scope.GridStackUI = GridStack;
950968

951969
scope.GridStackUI.Utils = Utils;

dist/gridstack.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)