From 08c86c27c824dbf077c9e868cb6ddc8f6b1c430d Mon Sep 17 00:00:00 2001 From: Daniel Lobo Date: Mon, 6 Dec 2021 11:24:00 -0300 Subject: [PATCH] fix: link direction flow --- src/Diagram/Port/Port.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Diagram/Port/Port.js b/src/Diagram/Port/Port.js index 9bba74e..be3915b 100644 --- a/src/Diagram/Port/Port.js +++ b/src/Diagram/Port/Port.js @@ -29,7 +29,7 @@ const Port = (props) => { onDragEnd((event) => { const targetPort = event.target.getAttribute('data-port-id'); if (targetPort && event.target !== ref.current && canLink(id, targetPort, type) && onSegmentConnect) { - const args = type === 'input' ? [id, targetPort, type] : [targetPort, id, type]; + const args = type === 'output' ? [id, targetPort, type] : [targetPort, id, type]; onSegmentConnect(...args); return;