Merge pull request #271 from mmrose/master
Adding enable and disable events
This commit is contained in:
commit
7c7fd5ae0a
2 changed files with 17 additions and 0 deletions
15
README.md
15
README.md
|
|
@ -214,6 +214,21 @@ $('.grid-stack').on('resizestop', function (event, ui) {
|
|||
});
|
||||
```
|
||||
|
||||
### disable(event)
|
||||
|
||||
```javascipt
|
||||
$('.grid-stack').on('disable', function(event) {
|
||||
var grid = event.target;
|
||||
});
|
||||
```
|
||||
|
||||
### enable(event)
|
||||
|
||||
```javascipt
|
||||
$('.grid-stack').on('enable', function(event) {
|
||||
var grid = event.target;
|
||||
});
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
|
|
|
|||
|
|
@ -814,11 +814,13 @@
|
|||
GridStack.prototype.disable = function() {
|
||||
this.movable(this.container.children('.' + this.opts.item_class), false);
|
||||
this.resizable(this.container.children('.' + this.opts.item_class), false);
|
||||
this.container.trigger('disable');
|
||||
};
|
||||
|
||||
GridStack.prototype.enable = function() {
|
||||
this.movable(this.container.children('.' + this.opts.item_class), true);
|
||||
this.resizable(this.container.children('.' + this.opts.item_class), true);
|
||||
this.container.trigger('enable');
|
||||
};
|
||||
|
||||
GridStack.prototype.locked = function(el, val) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue