get information if resize would be successful from tempPositionUpdates instead of gridlogic

This commit is contained in:
chfhtw
2026-04-16 11:53:23 +02:00
parent 2a86a70386
commit 4b064f566a
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -164,7 +164,6 @@ export default {
return item;
return {
resize: this.tempPositionUpdates[item.index]?.resize,
index: item.index,
weight: item.weight,
data: item.data,
@@ -195,7 +194,7 @@ export default {
modifiedDraggedItem.classes.push('drop-grid-item-resize');
if (this.draggedItem.oversized)
modifiedDraggedItem.classes.push('drop-grid-item-oversized')
else if (this.placedItems[draggedItemIndex].resize)
else if (this.tempPositionUpdates?.length)
modifiedDraggedItem.classes.push('drop-grid-item-sizechanged')
}
+1 -1
View File
@@ -156,7 +156,7 @@ class GridLogic {
const updates = this.add(currItem);
if(updates)
updates[item.index] = { index: item.index, w, h, x: item.x, y: item.y, resize:true };
updates[item.index] = { index: item.index, w, h, x: item.x, y: item.y };
return updates;
}