How to perform the loading of the widgets (gridster.js)?

Use the project library gridster.js (the users themselves can change the tiles, add new, etc.). The library contains a method to dump the location and size of the tiles, but when restoring there is one unpleasant feature.

If in the constructor you don't specify extra_cols (additional columns), tiles are drawn consistently within the limits of the screen. But the question is how to restore the original location (in my case - in a row). Example: jsfiddle.net/ekvfe/7.

If you specify extra_cols, it seems all is drawn normally. But if we add another tile, it will draw outside the screen (like how there is more free tiles and will draw there). I would like to still draw below, without going outside, and the user will move it if necessary.

By the way, there is a method generate_grid_and_stylesheet(), which sort of updates the layout when you change the settings, but it is not clear how it works (tiles overlap each other)

In General, help please:)
September 26th 19 at 06:44
1 answer
September 26th 19 at 06:46
But that option is not acceptable? He just puts it in the first place
jsfiddle.net/iiil/ekvfe/9

The second option here is a
jsfiddle.net/iiil/ekvfe/10
Define the last line and add the element below.
added response - tanner_Wintheis commented on September 26th 19 at 06:49
The first option is not suitable, because the collapses the location of existing tiles. Although, in principle, it is possible to try. The second option is now used to me, not very convenient that the line is almost empty and a new tile is placed on the following. But thanks for the answer! - laron.Stiedema commented on September 26th 19 at 06:52
where you want to get new tiles? Ideally, where? Draw some diagrams. - tanner_Wintheis commented on September 26th 19 at 06:55
Your second option - the first tile falls perfectly, and it should fall next to her on the same line etc, default behavior if not specified extra_cols - laron.Stiedema commented on September 26th 19 at 06:58

Find more questions by tags jQuery