20 comments

[ 3.1 ms ] story [ 55.4 ms ] thread
Shame it uses the bloated jquery UI
I liked this script, do you know something good not made in jQuery UI? thanks
similar libs: packery, masonry, gridster
From what I can see, jQuery UI is only brought in to add draggable functionality. It's possible to leave it out if you want.

Or just build jQuery UI with only the draggable component.

Not a big fan of jQuery UI myself, but just the dragging capabilities are built on top of jquery.draggable, the rest is jQuery and even DOM agnostic.

We build the lib into two components. There's the jQuery-dependent one that just powers the UI interaction and translates cols and rows into pixels for DOM elements. Then there's the main logic, which is an agnostic class that implements all the grid positioning and collision management logic. This makes it possible to calculate new grid positions on the server-side. Same with running unit tests.

(comment deleted)
(comment deleted)
Neat, but the zoom works the opposite way that I'd expect, is that just me?
It was reversed up until a few days ago, when I was told "adding/removing rows works the opposite way that you'd expect it" heh

Either way it's just two API calls in the demo page, the buttons aren't part of the lib itself

This is possibly because the buttons aren't labeled. Depending on whether you see them as "zoom in/out" buttons or "add/remove columns" buttons, your expectation is going to be different.
You're right, the demo is far from user friendly. Thing is we completed 90+% of the current functionality last year and then kept working on integrating it internally and the rest of our milestone. At this point so much time had passed that the open source prospects almost disappeared, so I decided it was now or never to release it to the public, since we had 4 months to "prepare" it and nothing happened. To see it gather over 1000 stars on Github is mind boggling, I didn't expect 100 honestly. The demo page is what I put together when showing the grid around internally as work in progress.
This can work for replicating awesomeWM in the browser. Nice.
I don't see why the items should dance around when "zooming out"/adding more rows, if the available space and constraints are the same. Is there a gravity component to it?

http://cl.ly/image/1E0A0z2C0x0b -> http://cl.ly/image/102E232Z443j

nicely done. i would reverse the functions of the zoom buttons as others have mentioned. adding responsiveness/media queries would make this ideal
Changing my browser window width doesn't seem to affect anything. Even after a page reload. It doesn't seem responsive at all. Am I missing something?
Neat, but when building draggable things, I always end up needing to have tabs, each of which is a draggable list like this, that can accept an element from another list.