|
@@ -3963,10 +3963,16 @@ $(document).ready(function () {
|
|
|
// checks if it has been dropped on an empty row
|
|
// checks if it has been dropped on an empty row
|
|
|
searchViewModel.gridItems().forEach(function (existingWidget) {
|
|
searchViewModel.gridItems().forEach(function (existingWidget) {
|
|
|
var existingWidgetFauxRow = parseInt($(existingWidget.gridsterElement).attr('data-row'));
|
|
var existingWidgetFauxRow = parseInt($(existingWidget.gridsterElement).attr('data-row'));
|
|
|
|
|
+ var existingWidgetFauxCol = parseInt($(existingWidget.gridsterElement).attr('data-row'));
|
|
|
var existingWidgetFauxHeight = parseInt($(existingWidget.gridsterElement).attr('data-sizey'));
|
|
var existingWidgetFauxHeight = parseInt($(existingWidget.gridsterElement).attr('data-sizey'));
|
|
|
|
|
+ var existingWidgetFauxWidth = parseInt($(existingWidget.gridsterElement).attr('data-sizex'));
|
|
|
if (dropPosition.row >= existingWidgetFauxRow && dropPosition.row < existingWidgetFauxRow + existingWidgetFauxHeight) {
|
|
if (dropPosition.row >= existingWidgetFauxRow && dropPosition.row < existingWidgetFauxRow + existingWidgetFauxHeight) {
|
|
|
dropOnEmptyRow = false;
|
|
dropOnEmptyRow = false;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (existingWidgetFauxRow == dropPosition.row + 1 && (dropPosition.col < existingWidgetFauxCol || dropPosition.col >= existingWidgetFauxCol + existingWidgetFauxWidth)) {
|
|
|
|
|
+ dropOnEmptyRow = false;
|
|
|
|
|
+ restoreWidgetSizes();
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
if (dropOnEmptyRow) {
|
|
if (dropOnEmptyRow) {
|