What are some example use cases? Judging from comments so far, several people need this and plan to use it but I'm having a difficult time thinking of use cases, other than puzzle games.
We built it for our own product, Ducksboard. Users can build their own metrics dashboards by adding widgets and arranging them as they like.
That's the use case: being able to arrange/sort a set of widgets by dragging and dropping them in an grid. Puzzles, dashboards, image collections, think of any thing built of visuals elements where order counts.
Nice, could be really useful for WYSIWYG web design in general. My first impulse was to try and resize the edges of the boxes, have you thought of implementing this?
I use something similar to allow users to manage the order in which images show up on their listings. (we provide a service for people to buy/sell cranes)
I've been trying to fake it on a recent project for Stanford's recent HCI online class (see http://btubbs.github.com/slapdash/), but Gridster looks much nicer. Will be switching.
Nice! and indeed needed...
How do you handle scroll areas? can one column be independently scrolling? that was my main pain point with JQueryUI draggable...
Note that your "Fork me on github" banner points to http://github.com/you, which shows me MY profile page :)
When the mouse pointer gets close to the bottom of the viewport while dragging an element we scroll the document. Columns are not scrolled on their own, since the whole grid is a "block".
We built it because jQuery sortables were limiting us to use separate columns, which couldn't handle "wide" (more than 1 column in width) elements.
Very nice! Any tips/issues on making it responsive to the window size? Having just viewed at the demo and not really digging into the code, I am not sure if this is rather obvious or not. Thanks!
This is the best dnd layout manager I have seen so far and trust me I have played with a lot of them. There is of course some improvement that can be made but that is what github is for. I really hope this project will get enough traction to warrant updates and new features.
great job
Very nice. Hopefully there's a simple way to take the serialized position array and parse out an order. Would be nice to use this plug-in to allow users to easily rank and group objects.