Fix:修复新创建的关联线位置始终在节点的右侧没有根据相对位置调整的问题

This commit is contained in:
街角小林 2024-01-15 17:50:24 +08:00
parent 62c61b6e53
commit c3652331ea

View File

@ -169,22 +169,26 @@ export const getNodePoint = (node, dir = 'right', range = 0, e = null) => {
case 'left':
return {
x: left,
y: top + height / 2 - range
y: top + height / 2 - range,
dir
}
case 'right':
return {
x: left + width,
y: top + height / 2 - range
y: top + height / 2 - range,
dir
}
case 'top':
return {
x: left + width / 2 - range,
y: top
y: top,
dir
}
case 'bottom':
return {
x: left + width / 2 - range,
y: top + height
y: top + height,
dir
}
default:
break