[dashboard] Fix move widgets corner cases when moving along the same row
@@ -4329,6 +4329,7 @@ $(document).ready(function () {
dimensions.col = adjustedDropPosition;
dimensions.sizex = newOptimalWidth;
+ var resizeAndMoveSiblings = function() {
var siblingCounter = 0;
for (var i = 1; i <= 12 / newOptimalWidth; i++) {
if (i !== droppedWidgetFauxColumn) {
@@ -4339,6 +4340,15 @@ $(document).ready(function () {
}
}
}
+
+ if (tempDraggableGridsterWidget) {
+ $gridster.move_widget($(tempDraggableGridsterWidget.gridsterElement), -100, -100, resizeAndMoveSiblings); // temporarily move it off grid
+ }
+ else {
+ resizeAndMoveSiblings();
+ }
+
+ }
}
if (tempDraggable) {
