From 9abd768bce45e036d3eb180419dedda9274570f9 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sun, 12 Dec 2021 00:47:50 +0100 Subject: [PATCH] fix(edges): connection line not showing up when no edges are defined Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- src/components/ConnectionLine/ConnectionLine.vue | 4 ++-- src/components/Edges/EdgeWrapper.vue | 12 ++++++------ src/components/Nodes/NodeWrapper.vue | 4 ++-- src/container/EdgeRenderer/EdgeRenderer.vue | 2 +- src/store/getters.ts | 4 ++-- src/utils/edge.ts | 2 +- src/utils/graph.ts | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/ConnectionLine/ConnectionLine.vue b/src/components/ConnectionLine/ConnectionLine.vue index 31310c75..91aa3908 100644 --- a/src/components/ConnectionLine/ConnectionLine.vue +++ b/src/components/ConnectionLine/ConnectionLine.vue @@ -14,8 +14,8 @@ const sourceHandle = : store.connectionHandleType && props.sourceNode.handleBounds[store.connectionHandleType ?? 'source']?.[0] const sourceHandleX = sourceHandle ? sourceHandle.x + sourceHandle.width / 2 : props.sourceNode.dimensions.width / 2 const sourceHandleY = sourceHandle ? sourceHandle.y + sourceHandle.height / 2 : props.sourceNode.dimensions.height -const sourceX = props.sourceNode.position.x + sourceHandleX -const sourceY = props.sourceNode.position.y + sourceHandleY +const sourceX = props.sourceNode.computedPosition.x + sourceHandleX +const sourceY = props.sourceNode.computedPosition.y + sourceHandleY const isRightOrLeft = sourceHandle?.position === Position.Left || sourceHandle?.position === Position.Right const targetPosition = isRightOrLeft ? Position.Left : Position.Top diff --git a/src/components/Edges/EdgeWrapper.vue b/src/components/Edges/EdgeWrapper.vue index 9983b743..3af08cfa 100644 --- a/src/components/Edges/EdgeWrapper.vue +++ b/src/components/Edges/EdgeWrapper.vue @@ -1,7 +1,7 @@