diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index 347faf2a4..a99731e04 100755 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -1290,6 +1290,9 @@ fn.update_widgets_dimensions = function () { $.each(this.$widgets, $.proxy(function (idx, widget) { var wgd = $(widget).coords().grid; + if (typeof (wgd) !== 'object') { + return; + } var width = (wgd.size_x * (this.is_responsive() ? this.get_responsive_col_width() : this.options.widget_base_dimensions[0]) + ((wgd.size_x - 1) * this.options.widget_margins[0])); @@ -1576,10 +1579,12 @@ this.$player.coords().grid.row = row; this.$player.coords().grid.col = col; +/* var widgetsIncell = this.get_widgets_under_player(); if (widgetsIncell.length > 0) { this.move_widget_down(widgetsIncell, this.placeholder_grid_data.size_y); } +*/ if (this.options.draggable.stop) { this.options.draggable.stop.call(this, event, ui); @@ -1988,7 +1993,7 @@ $overlapped_widgets.each($.proxy(function (i, w) { var $w = $(w); - if ($gr.can_go_down($w)) { + if ($gr.can_go_down($w) && $w.coords().grid.row === $gr.player_grid_data.row) { $gr.move_widget_down($w, $gr.player_grid_data.size_y); $gr.set_placeholder(to_col, to_row); } @@ -2021,7 +2026,7 @@ /* if there is not widgets overlapping in the new player position, * update the new placeholder position. */ if (!$overlapped_widgets.length) { - if (this.shift_widgets_up) { + if (this.options.shift_widgets_up) { var pp = this.can_go_player_up(this.player_grid_data); if (pp !== false) { to_row = pp;