Open tombrennand opened 9 years ago
Are you sorting the serialized information using Gridster.sort_by_row_and_col_asc
before calling add_widget
, as per this example? Make sure to view the source of the example.
I've tried it with and without sorting the serialized info... In my example there is only one widget to add anyway, so sorting it will not make a difference.
I've got the same problem. This is due to gridster's default behavior. Try to add your widgets by hand in the js console and you'll see what happens : if there is room for the newly added widget above it will be moved to the top. Is there any way to disable this behavior for a "free placing" of widgets? Thanks, anyone!
I am inserting the content using the add_widget method as the widget content is pulled in from a database.
However, when the widgets are added, the height of the grid is not adjusted to the content - it stays as the min-rows that I have specified and the widget overflows the grid. and can cause widgets to overlap and be placed in the wrong positions too.
Here's my code:
Here's a jsfiddle - http://jsfiddle.net/62ewxm4g/
And here's a fiddle of the same content which is hard coded rather than using the add_widget method - http://jsfiddle.net/62ewxm4g/1/
Is this a bug or am I doing something wrong?