ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.03k stars 1.2k forks source link

Fix leaking options with multiple Gridster instances #273

Closed myabc closed 10 years ago

myabc commented 10 years ago

defaults was being overwritten.

See jQuery documentation:

Keep in mind that the target object (first argument) will be modified, and will also be returned from $.extend().

myabc commented 10 years ago

This patch should resolve issue #272.

febeling commented 10 years ago

The problem is that all Gridster instances on a page mistakenly share the same options, because they receive the same options object. That is a bug, and this PR fixes it.

vieron commented 10 years ago

Rebased here 7ed79e56721069e90686a52d11eb7430d4cbf96e. Thanks!