mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 18:22:40 +00:00
[API] Remove unused LGraph.onNodeConnectionChange (#701)
Confirmed unused via code search.
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import type {
|
import type {
|
||||||
Dictionary,
|
Dictionary,
|
||||||
IContextMenuValue,
|
IContextMenuValue,
|
||||||
ISlotType,
|
|
||||||
LinkNetwork,
|
LinkNetwork,
|
||||||
LinkSegment,
|
LinkSegment,
|
||||||
MethodNames,
|
MethodNames,
|
||||||
@@ -58,7 +57,6 @@ export interface LGraphConfig {
|
|||||||
* supported callbacks:
|
* supported callbacks:
|
||||||
* + onNodeAdded: when a new node is added to the graph
|
* + onNodeAdded: when a new node is added to the graph
|
||||||
* + onNodeRemoved: when a node inside this graph is removed
|
* + onNodeRemoved: when a node inside this graph is removed
|
||||||
* + onNodeConnectionChange: some connection has changed in the graph (connected or disconnected)
|
|
||||||
*/
|
*/
|
||||||
export class LGraph implements LinkNetwork, Serialisable<SerialisableGraph> {
|
export class LGraph implements LinkNetwork, Serialisable<SerialisableGraph> {
|
||||||
static serialisedSchemaVersion = 1 as const
|
static serialisedSchemaVersion = 1 as const
|
||||||
@@ -206,13 +204,6 @@ export class LGraph implements LinkNetwork, Serialisable<SerialisableGraph> {
|
|||||||
onSerialize?(data: ISerialisedGraph | SerialisableGraph): void
|
onSerialize?(data: ISerialisedGraph | SerialisableGraph): void
|
||||||
onConfigure?(data: ISerialisedGraph | SerialisableGraph): void
|
onConfigure?(data: ISerialisedGraph | SerialisableGraph): void
|
||||||
onGetNodeMenuOptions?(options: (IContextMenuValue<unknown> | null)[], node: LGraphNode): void
|
onGetNodeMenuOptions?(options: (IContextMenuValue<unknown> | null)[], node: LGraphNode): void
|
||||||
onNodeConnectionChange?(
|
|
||||||
nodeSlotType: ISlotType,
|
|
||||||
targetNode: LGraphNode | null | undefined,
|
|
||||||
slotIndex: number,
|
|
||||||
sourceNode?: LGraphNode,
|
|
||||||
sourceSlotIndex?: number,
|
|
||||||
): void
|
|
||||||
|
|
||||||
private _input_nodes?: LGraphNode[]
|
private _input_nodes?: LGraphNode[]
|
||||||
|
|
||||||
|
|||||||
@@ -2444,20 +2444,6 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
|||||||
link_info,
|
link_info,
|
||||||
input,
|
input,
|
||||||
)
|
)
|
||||||
graph.onNodeConnectionChange?.(
|
|
||||||
NodeSlotType.INPUT,
|
|
||||||
target_node,
|
|
||||||
targetIndex,
|
|
||||||
this,
|
|
||||||
slot,
|
|
||||||
)
|
|
||||||
graph.onNodeConnectionChange?.(
|
|
||||||
NodeSlotType.OUTPUT,
|
|
||||||
this,
|
|
||||||
slot,
|
|
||||||
target_node,
|
|
||||||
targetIndex,
|
|
||||||
)
|
|
||||||
|
|
||||||
this.setDirtyCanvas(false, true)
|
this.setDirtyCanvas(false, true)
|
||||||
graph.afterChange()
|
graph.afterChange()
|
||||||
@@ -2531,8 +2517,6 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
|||||||
output,
|
output,
|
||||||
)
|
)
|
||||||
|
|
||||||
graph.onNodeConnectionChange?.(NodeSlotType.OUTPUT, this, slot)
|
|
||||||
graph.onNodeConnectionChange?.(NodeSlotType.INPUT, target, link_info.target_slot)
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2570,8 +2554,6 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
|||||||
link_info,
|
link_info,
|
||||||
output,
|
output,
|
||||||
)
|
)
|
||||||
graph.onNodeConnectionChange?.(NodeSlotType.OUTPUT, this, slot)
|
|
||||||
graph.onNodeConnectionChange?.(NodeSlotType.INPUT, target, link_info.target_slot)
|
|
||||||
}
|
}
|
||||||
output.links = null
|
output.links = null
|
||||||
}
|
}
|
||||||
@@ -2646,8 +2628,6 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
|||||||
link_info,
|
link_info,
|
||||||
output,
|
output,
|
||||||
)
|
)
|
||||||
this.graph?.onNodeConnectionChange?.(NodeSlotType.OUTPUT, target_node, i)
|
|
||||||
this.graph?.onNodeConnectionChange?.(NodeSlotType.INPUT, this, slot)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user