fix(core): check if prevClosestHandle exists in pointer up
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -95,7 +95,7 @@ export default {
|
||||
v-if="connectionLineComponent"
|
||||
:source-x="sourceX"
|
||||
:source-y="sourceY"
|
||||
:source-position="sourceHandle?.position"
|
||||
:source-position="fromPosition"
|
||||
:targetX="targetX"
|
||||
:targetY="targetY"
|
||||
:target-position="targetPosition"
|
||||
|
||||
@@ -176,9 +176,11 @@ export default function useHandle({
|
||||
}
|
||||
|
||||
function onPointerUp(event: MouseEvent | TouchEvent) {
|
||||
if (connection && isValid) {
|
||||
if (!onEdgeUpdate) emits.connect({ ...(defaultEdgeOptions?.value || {}), ...connection })
|
||||
else onEdgeUpdate(connection)
|
||||
if (prevClosestHandle) {
|
||||
if (connection && isValid) {
|
||||
if (!onEdgeUpdate) emits.connect({ ...(defaultEdgeOptions?.value || {}), ...connection })
|
||||
else onEdgeUpdate(connection)
|
||||
}
|
||||
}
|
||||
|
||||
emits.connectEnd(event)
|
||||
|
||||
Reference in New Issue
Block a user