From 680787d881bdf66f3f88cd13806ca3647b6aa61b Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Thu, 13 Oct 2022 14:44:33 +0200 Subject: [PATCH] Don't move out of bounds on Drag&Drop --- public/js/components/Dashboard/Section.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/components/Dashboard/Section.js b/public/js/components/Dashboard/Section.js index 2a531c45e..27ac148d4 100644 --- a/public/js/components/Dashboard/Section.js +++ b/public/js/components/Dashboard/Section.js @@ -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);