gridster.js
gridster.js copied to clipboard
Drag and drop widgets anywhere on a blank grid.
This is useful in having a flexible grid.
This is kind of happening with the bug here:
https://github.com/dustmoo/gridster.js/issues/2
However it isn't deliberate. There should be an option to change this behavior.
+1
I'm not sure of the side effects, but I was able to accomplish this with the following:
Search for: if (pp !== false) {
Replace with: if (pp !== false && 1 === 2) {
Obviously this isn't a real fix, but it shows that if "pp" returns false, that it turns it into a blank canvas without the columns above requirement. I tested it quite a bit and couldn't see any negative.
On second look.. This makes the placeholder/preview hard to position where you want it as it really can move anywhere, so this needs some refining.
+1
+1 for me too, would be great to have this.
just a heads up, I found a repo with similar functionality here:
repo: https://github.com/dagen-niger/fluidGrid.js demo: http://dagenniger.ipage.com/fluidGrid/demo.html
though it seems to only be a proof of concept at this time
Any updates on this feature? I do like the little 'hack' @bompus figured but as he said, it's pretty unpredictable and not quite solid. So I was wondering has there been any progress with this?
I need it too. +1
Working after the hack of @bompus did I found that if it's false, its because its under a item. Otherwise it will return a row number for the widget. If that number you add +1 you get your widget one row down.
if (pp !== false) {
to_row = pp+1;
}
Still haven't found the solution. It must create more grid coords and allow widget to use them I guess. Some one else working on this?
Ok... other approach I found is returning false function can_go_player_up() and can_go_widget_up(). So add a "return false;" right afterwards the function is declared.
Now to have a fixed amount of rows to move around you must override the set_dom_grid_height() function. (I did not found the min_rows applied). So for testing purposes I just set var r = 6 (I wanted six rows). Probably the best method would be to apply here min_rows.