Closed mayantigo closed 8 years ago
Ey!.
Im using gridster. I was using https://github.com/dustmoo/gridster.js.
I migrated to this version, (currently '0.7.0').
Problem is when I try to load a saved gridster I found this javascript error:
jquery.gridster.min.js:1 Uncaught Error: Not exists property col
col
My code is:
gridster = $(this).gridster({ widget_margins: [10, 10], widget_base_dimensions: [130, 130], max_cols: 6, min_cols: 6, min_rows: 10, shift_widgets_up: false, shift_larger_widgets_down: false, collision: { wait_for_mouseup: true }, draggable: { handle: 'span' }, resize: { enabled: true }, serialize_params: function($w, wgd) { return { reference: $($w).attr('id'), position_y: wgd.row, position_x: wgd.col, size_x: wgd.size_x, size_y: wgd.size_y, idcomponent: $($w).data('component'), content: $('#editable' + $($w).attr('id')).html(), type: $($w).data('type') }; } }).data("gridster");
Any suggestion about what happens?.
Thing is just fail when I unserialize a existing gridster. With new ones works perfectly.
Thanks!
Kind regards.
Ok I could see the problem.
The problem was:
Gridster.sort_by_row_and_col_asc(data)
That data didnt have 'col' property.
I added and it works correctly.
Close issue.
Thanks!.
Ey!.
Im using gridster. I was using https://github.com/dustmoo/gridster.js.
I migrated to this version, (currently '0.7.0').
Problem is when I try to load a saved gridster I found this javascript error:
jquery.gridster.min.js:1 Uncaught Error: Not exists property
col
My code is:
gridster = $(this).gridster({ widget_margins: [10, 10], widget_base_dimensions: [130, 130], max_cols: 6, min_cols: 6, min_rows: 10, shift_widgets_up: false, shift_larger_widgets_down: false, collision: { wait_for_mouseup: true }, draggable: { handle: 'span' }, resize: { enabled: true }, serialize_params: function($w, wgd) { return { reference: $($w).attr('id'), position_y: wgd.row, position_x: wgd.col, size_x: wgd.size_x, size_y: wgd.size_y, idcomponent: $($w).data('component'), content: $('#editable' + $($w).attr('id')).html(), type: $($w).data('type') }; } }).data("gridster");
Any suggestion about what happens?.
Thing is just fail when I unserialize a existing gridster. With new ones works perfectly.
Thanks!
Kind regards.