2
0

♻️ (editor) Migrate from react-draggable to @use-gesture

Closes #168
This commit is contained in:
Baptiste Arnaud
2022-11-18 07:58:43 +01:00
parent c4a4aa3e83
commit 7632c5426c
11 changed files with 255 additions and 206 deletions

View File

@ -136,7 +136,7 @@ const computeFourSegments = (
sourcePosition.x + (sourceType === 'right' ? stubLength : -stubLength)
segments.push(`L${firstSegmentX},${sourcePosition.y}`)
const secondSegmentY =
sourcePosition.y + (targetPosition.y - sourcePosition.y) / 2
sourcePosition.y + (targetPosition.y - sourcePosition.y) - stubLength
segments.push(`L${firstSegmentX},${secondSegmentY}`)
segments.push(`L${targetPosition.x},${secondSegmentY}`)