Skip to content

Commit

Permalink
Don't mutate this.opts.draggable or this.opts.resizable when usin…
Browse files Browse the repository at this point in the history
…g `_.extend`. Fixes gridstack#505.
  • Loading branch information
radiolips committed Aug 17, 2016
1 parent 8f072be commit 12605cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gridstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -1115,13 +1115,13 @@
};

el
.draggable(_.extend(this.opts.draggable, {
.draggable(_.extend({}, this.opts.draggable, {
containment: this.opts.isNested ? this.container.parent() : null,
start: onStartMoving,
stop: onEndMoving,
drag: dragOrResize
}))
.resizable(_.extend(this.opts.resizable, {
.resizable(_.extend({}, this.opts.resizable, {
start: onStartMoving,
stop: onEndMoving,
resize: dragOrResize
Expand Down

0 comments on commit 12605cc

Please sign in to comment.