diff --git a/src/features/ePocFlow/ePocFlow.vue b/src/features/ePocFlow/ePocFlow.vue index 2cf717b1dcaf3770f515b1ac651e760fa8ddee0c..e04ac0c4eef996752c670f5e3bd8074acb72b369 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); }