Fix new link follows pointer until menu closed (#3628)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
filtered
2025-04-26 03:26:03 +10:00
committed by GitHub
parent 8491ca91b7
commit ddff592561
2 changed files with 1 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View File

@@ -254,7 +254,7 @@ const cancelNextReset = (e: CustomEvent<CanvasPointerEvent>) => {
e.preventDefault()
const canvas = canvasStore.getCanvas()
canvas._highlight_pos = [e.detail.canvasX, e.detail.canvasY]
canvas.linkConnector.state.snapLinksPos = [e.detail.canvasX, e.detail.canvasY]
useEventListener(canvas.linkConnector.events, 'reset', preventDefault, {
once: true
})
@@ -291,7 +291,6 @@ const reset = () => {
if (disconnectOnReset) canvas.linkConnector.disconnectLinks()
canvas.linkConnector.reset()
canvas._highlight_pos = undefined
canvas.setDirty(true, true)
}