fix handle option

This commit is contained in:
Pavel Reznikov 2015-09-21 20:13:05 -07:00
commit b00114d5bc
4 changed files with 10 additions and 10 deletions

View file

@ -411,7 +411,7 @@
handles: 'se'
}),
draggable: _.defaults(opts.draggable || {}, {
handle: opts.handle_class || (opts.handle ? '.' + opts.handle : '') || '.grid-stack-item-content',
handle: (opts.handle_class ? '.' + opts.handle_class : (opts.handle ? opts.handle : '')) || '.grid-stack-item-content',
scroll: false,
appendTo: 'body'
})
@ -517,7 +517,7 @@
$(window).resize(this.on_resize_handler);
this.on_resize_handler();
};
GridStack.prototype._trigger_change_event = function(forceTrigger) {
var elements = this.grid.get_dirty_nodes();
var hasChanges = false;
@ -761,7 +761,7 @@
this.container.remove();
Utils.remove_stylesheet(this._styles_id);
if (this.grid)
this.grid = null;
this.grid = null;
};
GridStack.prototype.resizable = function(el, val) {
@ -959,7 +959,7 @@
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 {