Skip to content

Commit 5c6d25c

Browse files
committed
fix(gridster): sort widgets appropriately when reading them from DOM
1 parent 8ec307b commit 5c6d25c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jquery.gridster.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -3011,8 +3011,9 @@
30113011
* @return {Object} Returns the instance of the Gridster class.
30123012
*/
30133013
fn.get_widgets_from_DOM = function() {
3014-
this.$widgets.each($.proxy(function(i, widget) {
3015-
this.register_widget($(widget));
3014+
var widgets_coords = this.$widgets.map($.proxy(function(i, widget) {
3015+
var $w = $(widget);
3016+
return this.dom_to_coords($w);
30163017
}, this));
30173018

30183019
widgets_coords = Gridster.sort_by_row_and_col_asc(widgets_coords);

0 commit comments

Comments
 (0)