diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index cb3390152..6d8c85053 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -893,7 +893,8 @@ export class LGraphCanvas implements ConnectionColorContext { /** @param options Parameter is never used */ static showMenuNodeOptionalInputs( v: unknown, - options: INodeInputSlot[], + /** Unused - immediately overwritten */ + _options: boolean, e: MouseEvent, prev_menu: ContextMenu, node: LGraphNode, @@ -905,9 +906,9 @@ export class LGraphCanvas implements ConnectionColorContext { const canvas = LGraphCanvas.active_canvas const ref_window = canvas.getCanvasWindow() - options = node.onGetInputs + const options = node.onGetInputs ? node.onGetInputs() - : node.optional_inputs + : undefined let entries: IOptionalSlotData[] = [] if (options) { @@ -973,7 +974,8 @@ export class LGraphCanvas implements ConnectionColorContext { /** @param options Parameter is never used */ static showMenuNodeOptionalOutputs( v: unknown, - options: INodeOutputSlot[], + /** Unused - immediately overwritten */ + _options: INodeOutputSlot[], e: unknown, prev_menu: ContextMenu, node: LGraphNode, @@ -984,9 +986,9 @@ export class LGraphCanvas implements ConnectionColorContext { const canvas = LGraphCanvas.active_canvas const ref_window = canvas.getCanvasWindow() - options = node.onGetOutputs + const options = node.onGetOutputs ? node.onGetOutputs() - : node.optional_outputs + : undefined let entries: IOptionalSlotData[] = [] if (options) { diff --git a/src/LGraphNode.ts b/src/LGraphNode.ts index edf59f305..eb2ee89ea 100644 --- a/src/LGraphNode.ts +++ b/src/LGraphNode.ts @@ -279,10 +279,6 @@ export class LGraphNode implements Positionable, IPinnable, IColorable { _shape?: RenderShape mouseOver?: IMouseOverData redraw_on_mouse?: boolean - // Appears unused - optional_inputs? - // Appears unused - optional_outputs? resizable?: boolean clonable?: boolean _relative_id?: number diff --git a/test/__snapshots__/ConfigureGraph.test.ts.snap b/test/__snapshots__/ConfigureGraph.test.ts.snap index 1f7a5ebf0..b6c0bc2cf 100644 --- a/test/__snapshots__/ConfigureGraph.test.ts.snap +++ b/test/__snapshots__/ConfigureGraph.test.ts.snap @@ -82,8 +82,6 @@ LGraph { "lostFocusAt": undefined, "mode": 0, "mouseOver": undefined, - "optional_inputs": undefined, - "optional_outputs": undefined, "order": 0, "outputs": [], "properties": {}, @@ -148,8 +146,6 @@ LGraph { "lostFocusAt": undefined, "mode": 0, "mouseOver": undefined, - "optional_inputs": undefined, - "optional_outputs": undefined, "order": 0, "outputs": [], "properties": {}, @@ -215,8 +211,6 @@ LGraph { "lostFocusAt": undefined, "mode": 0, "mouseOver": undefined, - "optional_inputs": undefined, - "optional_outputs": undefined, "order": 0, "outputs": [], "properties": {}, diff --git a/test/__snapshots__/LGraph.test.ts.snap b/test/__snapshots__/LGraph.test.ts.snap index efa37d08b..84aea52ad 100644 --- a/test/__snapshots__/LGraph.test.ts.snap +++ b/test/__snapshots__/LGraph.test.ts.snap @@ -84,8 +84,6 @@ LGraph { "lostFocusAt": undefined, "mode": undefined, "mouseOver": undefined, - "optional_inputs": undefined, - "optional_outputs": undefined, "order": 0, "outputs": [], "properties": {}, @@ -152,8 +150,6 @@ LGraph { "lostFocusAt": undefined, "mode": undefined, "mouseOver": undefined, - "optional_inputs": undefined, - "optional_outputs": undefined, "order": 0, "outputs": [], "properties": {}, @@ -221,8 +217,6 @@ LGraph { "lostFocusAt": undefined, "mode": undefined, "mouseOver": undefined, - "optional_inputs": undefined, - "optional_outputs": undefined, "order": 0, "outputs": [], "properties": {}, diff --git a/test/__snapshots__/LGraph_constructor.test.ts.snap b/test/__snapshots__/LGraph_constructor.test.ts.snap index 432245ebc..80151bf91 100644 --- a/test/__snapshots__/LGraph_constructor.test.ts.snap +++ b/test/__snapshots__/LGraph_constructor.test.ts.snap @@ -82,8 +82,6 @@ LGraph { "lostFocusAt": undefined, "mode": 0, "mouseOver": undefined, - "optional_inputs": undefined, - "optional_outputs": undefined, "order": 0, "outputs": [], "properties": {}, @@ -148,8 +146,6 @@ LGraph { "lostFocusAt": undefined, "mode": 0, "mouseOver": undefined, - "optional_inputs": undefined, - "optional_outputs": undefined, "order": 0, "outputs": [], "properties": {}, @@ -215,8 +211,6 @@ LGraph { "lostFocusAt": undefined, "mode": 0, "mouseOver": undefined, - "optional_inputs": undefined, - "optional_outputs": undefined, "order": 0, "outputs": [], "properties": {},