Skip to content

Commit

Permalink
fix(gridster): sort widgets appropriately when reading them from DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
vieron committed Jun 25, 2014
1 parent 8ec307b commit 5c6d25c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/jquery.gridster.js
Original file line number Diff line number Diff line change
Expand Up @@ -3011,8 +3011,9 @@
* @return {Object} Returns the instance of the Gridster class.
*/
fn.get_widgets_from_DOM = function() {
this.$widgets.each($.proxy(function(i, widget) {
this.register_widget($(widget));
var widgets_coords = this.$widgets.map($.proxy(function(i, widget) {
var $w = $(widget);
return this.dom_to_coords($w);
}, this));

widgets_coords = Gridster.sort_by_row_and_col_asc(widgets_coords);
Expand Down

0 comments on commit 5c6d25c

Please sign in to comment.