From 2fe0f9fd45b19a8507eb87fe47eb2c5d3fa39fc0 Mon Sep 17 00:00:00 2001
From: Julian Leucker <leuckerj@gmail.com>
Date: Mon, 6 Feb 2023 13:39:57 +0100
Subject: [PATCH] Run linter

---
 src/DragContainer.vue | 18 ++++++++----------
 src/Grid.vue          | 13 ++++++++++---
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/src/DragContainer.vue b/src/DragContainer.vue
index 14ca96c..81adf9c 100644
--- a/src/DragContainer.vue
+++ b/src/DragContainer.vue
@@ -21,16 +21,14 @@ export default {
   methods: {
     handleDragStart(event) {
       event.dataTransfer.setData(
-          "vueDrag/gridItem",
-          JSON.stringify(
-              {
-                key: this.dragID,
-                x: this.x,
-                y: this.y,
-                w: this.w,
-                h: this.h
-              }
-          )
+        "vueDrag/gridItem",
+        JSON.stringify({
+          key: this.dragID,
+          x: this.x,
+          y: this.y,
+          w: this.w,
+          h: this.h,
+        })
       );
     },
   },
diff --git a/src/Grid.vue b/src/Grid.vue
index 7011fd7..d65134e 100644
--- a/src/Grid.vue
+++ b/src/Grid.vue
@@ -39,9 +39,16 @@ export default {
       let data = event.dataTransfer.getData("vueDrag/gridItem");
       let element = JSON.parse(data);
       console.log(element);
-      this.items.splice(this.items.findIndex((i) => {return i.key === element.key}), 1);
-      element.x = 1 + Math.trunc(event.layerX / (event.target.offsetWidth / this.cols));
-      element.y = 1 + Math.trunc(event.layerY / (event.target.offsetHeight / this.rows));
+      this.items.splice(
+        this.items.findIndex((i) => {
+          return i.key === element.key;
+        }),
+        1
+      );
+      element.x =
+        1 + Math.trunc(event.layerX / (event.target.offsetWidth / this.cols));
+      element.y =
+        1 + Math.trunc(event.layerY / (event.target.offsetHeight / this.rows));
       this.items.push(element);
     },
   },
-- 
GitLab