MCPcopy Create free account
hub / github.com/Comfy-Org/litegraph.js / getWidgetFromSlot

Method getWidgetFromSlot

src/LGraphNode.ts:3664–3667  ·  view source on GitHub ↗

* Returns the widget that is associated with the given input slot.

(slot: INodeInputSlot)

Source from the content-addressed store, hash-verified

3662 * Returns the widget that is associated with the given input slot.
3663 */
3664 getWidgetFromSlot(slot: INodeInputSlot): IBaseWidget | undefined {
3665 if (!isWidgetInputSlot(slot)) return
3666 return this.widgets?.find(w => w.name === slot.widget.name)
3667 }
3668
3669 /**
3670 * Draws the node's input and output slots.

Callers 6

computeSizeMethod · 0.95
drawSlotsMethod · 0.95
processMouseMoveMethod · 0.80
connectMethod · 0.80
resolveInputMethod · 0.80

Calls 1

isWidgetInputSlotFunction · 0.90

Tested by

no test coverage detected