Don't move out of bounds on Drag&Drop

This commit is contained in:
cgfhtw
2022-10-13 14:44:33 +02:00
parent a71ead0a85
commit 680787d881
+2 -2
View File
@@ -241,8 +241,8 @@ export default {
this.gridYLast = gridY;
if (action == 'm') {
x = gridX + 1;
y = gridY + 1;
x = Math.max(gridX + 1, 1);
y = Math.max(gridY + 1, 1);
w = parseInt(this.dataTransfer.w);
h = parseInt(this.dataTransfer.h);