From 95d85c7f5be93c815e16c79669dc1d8da1a290ab Mon Sep 17 00:00:00 2001 From: chfhtw Date: Wed, 22 Apr 2026 09:36:11 +0200 Subject: [PATCH] temporary change height on dragging if the reordering process needs it (otherwise we get some ugly overflow issue on the preview item or if another item is moved to the bottom it vanishes during the drag and drop operation and reappears after the drop) --- public/js/components/Drop/Grid.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/js/components/Drop/Grid.js b/public/js/components/Drop/Grid.js index 1115e6ed6..b3f331200 100644 --- a/public/js/components/Drop/Grid.js +++ b/public/js/components/Drop/Grid.js @@ -42,6 +42,7 @@ export default { mode: MODE_IDLE, draggedOffset: [0, 0], draggedItem: null, + overwriteRows: null, clonedWidget: null, // ghost image // tile coordinates while dragging x: -1, @@ -55,8 +56,12 @@ export default { // gridlogic rows() { if (this.additionalRowComputed) { + if (this.overwriteRows !== null) + return this.overwriteRows + 1; return this.grid ? (this.grid.h+1) : 1; } + if (this.overwriteRows !== null) + return this.overwriteRows; return this.grid ? this.grid.h : 1; }, additionalRowComputed: { @@ -470,6 +475,7 @@ export default { targetCoordinates.h = this.draggedItem.h; this.tempPositionUpdates = dragGrid.move(this.draggedItem, x, y); + this.overwriteRows = dragGrid.h; break; } case MODE_RESIZE: { @@ -491,6 +497,7 @@ export default { targetCoordinates.h = h; this.tempPositionUpdates = dragGrid.resize(this.draggedItem, w, h); + this.overwriteRows = dragGrid.h; break; } } @@ -506,6 +513,8 @@ export default { }, _cleanupDragging() { this.mode = MODE_IDLE; + this.overwriteRows = null; + if (this.draggedItem) { const draggedItem = this.indexedItems.find(item => item.index == this.draggedItem.index); delete draggedItem.classes;