Hey, I saw the previous issues which told me about "serialize".
I have to maintain the order of the re-positioned widgets whenever the page is refreshed. Is there any way to dynamically assign the row and col values?
I am logging the state like this:
gridster = $(".gridster ul").gridster({
serialize_params: function($w, wgd) {
return {
id: wgd.el[0].id,
col: wgd.col,
row: wgd.row,
size_x: wgd.size_x,
size_y: wgd.size_y,
widget_margins: [25, 25],
widget_base_dimensions: [350, 150],
min_cols: 3,
}
},
draggable: {
stop: function(event, ui) {
var positions = JSON.stringify(gridster.serialize());
console.log(positions);
}
}
}).data('gridster');
Please help!
Hey, I saw the previous issues which told me about "serialize". I have to maintain the order of the re-positioned widgets whenever the page is refreshed. Is there any way to dynamically assign the row and col values?
I am logging the state like this:
gridster = $(".gridster ul").gridster({ serialize_params: function($w, wgd) { return { id: wgd.el[0].id, col: wgd.col, row: wgd.row, size_x: wgd.size_x, size_y: wgd.size_y, widget_margins: [25, 25], widget_base_dimensions: [350, 150], min_cols: 3, } }, draggable: { stop: function(event, ui) { var positions = JSON.stringify(gridster.serialize()); console.log(positions); } } }).data('gridster');
Please help!