From 3fc65b0fde1b35b2b4e20428c2527cc0fa00c32e Mon Sep 17 00:00:00 2001 From: Julian <leuckerj@gmail.com> Date: Wed, 23 Apr 2025 09:56:03 +0000 Subject: [PATCH] Fix field validation in positionAllowed --- package.json | 2 +- src/DragGrid.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3b053e3..27e5a08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-draggable-grid", - "version": "0.4.0", + "version": "0.4.1", "scripts": { "build": "vite build", "example:build": "vite build example", diff --git a/src/DragGrid.vue b/src/DragGrid.vue index c5e18ea..36339bd 100644 --- a/src/DragGrid.vue +++ b/src/DragGrid.vue @@ -144,7 +144,7 @@ export default { }, methods: { positionAllowed(x, y, key) { - if (x < 0 || y < 0) return false; + if (x <=0 || y <= 0) return false; if (x > this.cols) return false; if (y > this.rows) return false; -- GitLab