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

Create a 2x2 Grid #270

Open filipemonteiroth opened 10 years ago

filipemonteiroth commented 10 years ago

Hi Folks.

Well, i wish i could make a grid that is something like a 2x2 grid. I just want to limit the number of columns to 2. I set max_cols to 2 but it doesn't seen to work. My setup is like that:

widgets.gridster = $(".gridster ul").gridster({ widget_margins: [40, 20], widget_base_dimensions: [105, 140], draggable: { stop: function() { widgets.update_locations(); } } }).data('gridster');

MichaelPaulukonis commented 10 years ago

I set max_cols to 2 but it doesn't seem to work.

What does happen?

filipemonteiroth commented 10 years ago

It creates two columns as expected, but my widget can't move. What i really wanted is: I don't want widgets movin' to more than 2 columns in a row.