6 ms·
GridList – Drag and drop library for a 2D resizable and responsive list of items
- jjsz 13y agoThis can work for replicating awesomeWM in the browser. Nice.
- ricardobeat 13y agoI 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/1E0A0z2C0x0b -> http://cl.ly/image/102E232Z443j http://cl.ly/image/102E232Z443j
- skidding 13y agoWell we're trying to 1. occupy as much empty space as possible and then 2. preserve as much as possible of the horizontal order of items when resizing the grid PS. We have some docs for these methods https://github.com/uberVU/grid#resizegridrows https://github.com/uberVU/grid#resizegridrows
- skidding 13y agoGithub repo in case you missed it: https://github.com/uberVU/grid https://github.com/uberVU/grid
- rgho 13y agonicely done. i would reverse the functions of the zoom buttons as others have mentioned. adding responsiveness/media queries would make this ideal
- grannyg00se 13y agoChanging 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?
- skidding 13y agoIt's a horizontal grid, so it's responsive when you change height and it scrolls horizontally. Take a look at the project README for more info: https://github.com/uberVU/grid/blob/master/README.md https://github.com/uberVU/grid/blob/master/README.md
- johnnyg 13y agoNeat, 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.
- NewsReader42 13y agoShame it uses the bloated jquery UI
- skidding 13y agoNot 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.
- SergeyDruid 13y agoI liked this script, do you know something good not made in jQuery UI? thanks
- mc_hammer 13y agosimilar libs: packery, masonry, gridster
- Gigablah 13y agoFrom 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.
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- jebus989 13y agoNeat, but the zoom works the opposite way that I'd expect, is that just me?
- skidding 13y agoIt 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
- grannyg00se 13y agoThis 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.
- skidding 13y agoYou'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.
- SergeyDruid 13y agosame here :)