This commit is contained in:
Pavel Reznikov 2016-02-13 14:42:09 -08:00
parent dd4447920f
commit ca594a6ba2
3 changed files with 12 additions and 21 deletions

29
dist/gridstack.js vendored
View file

@ -702,15 +702,16 @@
el
.draggable(_.extend(this.opts.draggable, {
containment: this.opts.is_nested ? this.container.parent() : null
containment: this.opts.is_nested ? this.container.parent() : null,
start: on_start_moving,
stop: on_end_moving,
drag: drag_or_resize
}))
.on('dragstart', on_start_moving)
.on('dragstop', on_end_moving)
.on('drag', drag_or_resize)
.resizable(_.extend(this.opts.resizable, {}))
.on('resizestart', on_start_moving)
.on('resizestop', on_end_moving)
.on('resize', drag_or_resize);
.resizable(_.extend(this.opts.resizable, {
resizestart: on_start_moving,
resizestop: on_end_moving,
resize: drag_or_resize
}));
if (node.no_move || this._is_one_column_mode()) {
el.draggable('disable');
@ -1003,22 +1004,12 @@
scope.GridStackUI.Utils = Utils;
function event_stop_propagate(event) {
event.stopPropagation();
}
$.fn.gridstack = function(opts) {
return this.each(function() {
var o = $(this);
if (!o.data('gridstack')) {
o
.data('gridstack', new GridStack(this, opts))
.on('dragstart', event_stop_propagate)
.on('dragstop', event_stop_propagate)
.on('drag', event_stop_propagate)
.on('resizestart', event_stop_propagate)
.on('resizestop', event_stop_propagate)
.on('resize', event_stop_propagate)
.on('change', event_stop_propagate);
.data('gridstack', new GridStack(this, opts));
}
});
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long