From 8398f1eda8489cf1b65bd06892535c40b1a41ed5 Mon Sep 17 00:00:00 2001
From: NathanViaud <nathan.viaud@inria.fr>
Date: Thu, 8 Jun 2023 10:11:09 +0200
Subject: [PATCH] ignoring null delta movements

---
 src/features/ePocFlow/ePocFlow.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/features/ePocFlow/ePocFlow.vue b/src/features/ePocFlow/ePocFlow.vue
index 2cf717b1..e04ac0c4 100644
--- a/src/features/ePocFlow/ePocFlow.vue
+++ b/src/features/ePocFlow/ePocFlow.vue
@@ -189,11 +189,16 @@ function nodeDragStart(event) {
 
 function nodeDragStop(event) {
     const { node } = event;
+    
+    const deltaX = node.position.x - initialNodePos.x;
+    const deltaY = node.position.y - initialNodePos.y;
+    
+    if(deltaX === 0 && deltaY === 0) return;
 
     const undoRedoAction: NodeMovedAction = {
         type: 'nodeMoved',
         nodeId: node.id,
-        deltaMovement: { x: node.position.x - initialNodePos.x, y: node.position.y - initialNodePos.y }
+        deltaMovement: { x: deltaX, y: deltaY },
     };
     undoRedoStore.addAction(undoRedoAction);
 }
-- 
GitLab