mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
Fixed broken connect method
This commit is contained in:
@@ -3603,10 +3603,14 @@
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var output = this.outputs[slot];
|
||||||
|
var input = target_node.inputs[target_slot];
|
||||||
|
|
||||||
if (LiteGraph.isValidConnection(output.type, input.type)) {
|
if (LiteGraph.isValidConnection(output.type, input.type)) {
|
||||||
if (target_node.onBeforeConnectInput) {
|
if (target_node.onBeforeConnectInput) {
|
||||||
// This way node can choose another slot (if selected is occupied)
|
// This way node can choose another slot (if selected is occupied)
|
||||||
target_slot = target_node.onBeforeConnectInput(target_slot);
|
target_slot = target_node.onBeforeConnectInput(target_slot);
|
||||||
|
input = target_node.inputs[target_slot];
|
||||||
}
|
}
|
||||||
|
|
||||||
//if there is something already plugged there, disconnect
|
//if there is something already plugged there, disconnect
|
||||||
@@ -3618,8 +3622,6 @@
|
|||||||
//this.setDirtyCanvas(false,true);
|
//this.setDirtyCanvas(false,true);
|
||||||
//this.graph.connectionChange( this );
|
//this.graph.connectionChange( this );
|
||||||
|
|
||||||
var output = this.outputs[slot];
|
|
||||||
|
|
||||||
//allows nodes to block connection
|
//allows nodes to block connection
|
||||||
if (target_node.onConnectInput) {
|
if (target_node.onConnectInput) {
|
||||||
if ( target_node.onConnectInput(target_slot, output.type, output, this, slot) === false ) {
|
if ( target_node.onConnectInput(target_slot, output.type, output, this, slot) === false ) {
|
||||||
@@ -3627,7 +3629,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var input = target_node.inputs[target_slot];
|
|
||||||
var link_info = null;
|
var link_info = null;
|
||||||
|
|
||||||
link_info = new LLink(
|
link_info = new LLink(
|
||||||
|
|||||||
Reference in New Issue
Block a user