fix(core): add missing straight path switch case

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-02-11 02:13:44 +01:00
parent 1ae5659b6b
commit b7cfec7842

View File

@@ -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