From b7cfec78424e2044121f757a568b3dc1b8e04261 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 11 Feb 2023 02:13:44 +0100 Subject: [PATCH] fix(core): add missing straight path switch case Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --- .../src/components/ConnectionLine/ConnectionLine.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/core/src/components/ConnectionLine/ConnectionLine.vue b/packages/core/src/components/ConnectionLine/ConnectionLine.vue index d93fa6ff..2eaa9896 100644 --- a/packages/core/src/components/ConnectionLine/ConnectionLine.vue +++ b/packages/core/src/components/ConnectionLine/ConnectionLine.vue @@ -60,7 +60,9 @@ const dAttr = computed(() => { targetPosition: targetPosition.value, } - switch (connectionLineType || connectionLineOptions.type) { + const type = connectionLineType ?? connectionLineOptions.type + + switch (type) { case ConnectionLineType.Bezier: ;[path] = getBezierPath(pathParams) break @@ -76,6 +78,12 @@ const dAttr = computed(() => { case ConnectionLineType.SimpleBezier: ;[path] = getSimpleBezierPath(pathParams) break + case ConnectionLineType.Straight: + ;[path] = getStraightPath(pathParams) + break + default: + ;[path] = getBezierPath(pathParams) + break } return path