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