From ccc588b842408d2ce2b74644ff80ab3384394c8c Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Mon, 28 Apr 2025 11:52:53 +1000 Subject: [PATCH] [API] Remove unused: LGraphNode.addConnection (#980) Confirmed unused via code search --- src/LGraphNode.ts | 20 ------------------- .../__snapshots__/ConfigureGraph.test.ts.snap | 3 --- test/__snapshots__/LGraph.test.ts.snap | 3 --- .../LGraph_constructor.test.ts.snap | 3 --- 4 files changed, 29 deletions(-) diff --git a/src/LGraphNode.ts b/src/LGraphNode.ts index d710979ce..fb85762dd 100644 --- a/src/LGraphNode.ts +++ b/src/LGraphNode.ts @@ -214,8 +214,6 @@ export class LGraphNode implements Positionable, IPinnable, IColorable { #concreteInputs: NodeInputSlot[] = [] #concreteOutputs: NodeOutputSlot[] = [] - // Not used - connections: unknown[] = [] properties: Dictionary = {} properties_info: INodePropertyInfo[] = [] flags: INodeFlags = {} @@ -1508,24 +1506,6 @@ export class LGraphNode implements Positionable, IPinnable, IColorable { this.setDirtyCanvas(true, true) } - /** - * add an special connection to this node (used for special kinds of graphs) - * @param type string defining the input type ("vec3","number",...) - * @param pos position of the connection inside the node - * @param direction if is input or output - */ - addConnection(name: string, type: string, pos: Point, direction: string) { - const o = { - name: name, - type: type, - pos: pos, - direction: direction, - links: null, - } - this.connections.push(o) - return o - } - /** * computes the minimum size of a node according to its inputs and output slots * @returns the total size diff --git a/test/__snapshots__/ConfigureGraph.test.ts.snap b/test/__snapshots__/ConfigureGraph.test.ts.snap index 2c9c4b76a..dbc29135b 100644 --- a/test/__snapshots__/ConfigureGraph.test.ts.snap +++ b/test/__snapshots__/ConfigureGraph.test.ts.snap @@ -65,7 +65,6 @@ LGraph { "clip_area": undefined, "clonable": undefined, "color": undefined, - "connections": [], "console": undefined, "exec_version": undefined, "execute_triggered": undefined, @@ -134,7 +133,6 @@ LGraph { "clip_area": undefined, "clonable": undefined, "color": undefined, - "connections": [], "console": undefined, "exec_version": undefined, "execute_triggered": undefined, @@ -204,7 +202,6 @@ LGraph { "clip_area": undefined, "clonable": undefined, "color": undefined, - "connections": [], "console": undefined, "exec_version": undefined, "execute_triggered": undefined, diff --git a/test/__snapshots__/LGraph.test.ts.snap b/test/__snapshots__/LGraph.test.ts.snap index 52c1ff93d..1879b70f9 100644 --- a/test/__snapshots__/LGraph.test.ts.snap +++ b/test/__snapshots__/LGraph.test.ts.snap @@ -65,7 +65,6 @@ LGraph { "clip_area": undefined, "clonable": undefined, "color": undefined, - "connections": [], "console": undefined, "exec_version": undefined, "execute_triggered": undefined, @@ -136,7 +135,6 @@ LGraph { "clip_area": undefined, "clonable": undefined, "color": undefined, - "connections": [], "console": undefined, "exec_version": undefined, "execute_triggered": undefined, @@ -208,7 +206,6 @@ LGraph { "clip_area": undefined, "clonable": undefined, "color": undefined, - "connections": [], "console": undefined, "exec_version": undefined, "execute_triggered": undefined, diff --git a/test/__snapshots__/LGraph_constructor.test.ts.snap b/test/__snapshots__/LGraph_constructor.test.ts.snap index 644299913..10022c368 100644 --- a/test/__snapshots__/LGraph_constructor.test.ts.snap +++ b/test/__snapshots__/LGraph_constructor.test.ts.snap @@ -65,7 +65,6 @@ LGraph { "clip_area": undefined, "clonable": undefined, "color": undefined, - "connections": [], "console": undefined, "exec_version": undefined, "execute_triggered": undefined, @@ -134,7 +133,6 @@ LGraph { "clip_area": undefined, "clonable": undefined, "color": undefined, - "connections": [], "console": undefined, "exec_version": undefined, "execute_triggered": undefined, @@ -204,7 +202,6 @@ LGraph { "clip_area": undefined, "clonable": undefined, "color": undefined, - "connections": [], "console": undefined, "exec_version": undefined, "execute_triggered": undefined,