Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Bug]: Multiple issues with shift-dragging links to subgraph output n…
…ode input slots

Fixes #4877
When shift clicking, ignore links that are no longer present in the subgraph.
  • Loading branch information
DrJKL committed Aug 20, 2025
commit ba0595603ac6e1fd133d14c2dafcf5bf48e49b1a
18 changes: 15 additions & 3 deletions src/lib/litegraph/src/LGraphCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2585,9 +2585,21 @@ export class LGraphCanvas
e.shiftKey &&
(output.links?.length || output._floatingLinks?.size)
) {
linkConnector.moveOutputLink(graph, output)
this.#linkConnectorDrop()
return
const outputLinks = [
...(output.links ?? []),
...[...(output._floatingLinks ?? new Set())]
]
if (
outputLinks.some(
(linkId) =>
typeof linkId === 'number' &&
graph.getLink(linkId) !== undefined
)
) {
linkConnector.moveOutputLink(graph, output)
this.#linkConnectorDrop()
return
}
}

// New output link
Expand Down