mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-26 12:57:42 +08:00
Fix:修复新创建的关联线位置始终在节点的右侧没有根据相对位置调整的问题
This commit is contained in:
parent
62c61b6e53
commit
c3652331ea
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user