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

this.resize_api - undefined - line 982 #316

Open 45kicks opened 10 years ago

45kicks commented 10 years ago

If you create a gridster object and have a resize option but have it disabled, it doesn't create a resize_api and creates errors if you attempt to enable resizing later. ...$(thing).gridster({resize:{max_size:[6,4],stop:function(){}, enabled:false})...

It creates functional gridster object that throws errors when attempting to enable_resize().

However, if the gridster object is created with enabled:true and then just disabled immediately, I can call enable_resize() and disable_resize() without issues later.

aliwright75 commented 9 years ago

Thanks - this has saved me some bother! Has it been reported as a bug?

gugahoi commented 9 years ago

Thanks!! Just ran into this problem too!