Skip to content

Commit 0627a71

Browse files
committed
those who know cont
1 parent 839d8a5 commit 0627a71

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

src/lib/litegraph/src/canvas/MovingInputLink.ts

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,30 +73,8 @@ export class MovingInputLink extends MovingLinkBase {
7373
return link
7474
}
7575

76-
connectToOutput(
77-
outputNode: LGraphNode,
78-
output: INodeOutputSlot,
79-
events: CustomEventTarget<LinkConnectorEventMap>
80-
): LLink | null | undefined {
81-
if (
82-
outputNode === this.outputNode &&
83-
output === this.outputSlot &&
84-
this.inputSlot === this.inputNode.inputs[this.inputIndex]
85-
) {
86-
return
87-
}
88-
89-
const afterRerouteId = this.fromReroute?.id ?? this.link.parentId
90-
91-
this.inputNode.disconnectInput(this.inputIndex, true)
92-
const newLink = outputNode.connectSlots(
93-
output,
94-
this.inputNode,
95-
this.inputSlot,
96-
afterRerouteId
97-
)
98-
if (newLink) events.dispatch('input-moved', this)
99-
return newLink
76+
connectToOutput(): never {
77+
throw new Error('MovingInputLink cannot connect to an output.')
10078
}
10179

10280
connectToSubgraphInput(): void {

0 commit comments

Comments
 (0)