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

Method #measureSlots

src/LGraphNode.ts:3616–3634  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3614 }
3615
3616 #measureSlots(): ReadOnlyRect | null {
3617 const slots: (NodeInputSlot | NodeOutputSlot)[] = []
3618
3619 for (const [slotIndex, slot] of this.#concreteInputs.entries()) {
3620 // Unrecognized nodes (Nodes with error) has inputs but no widgets. Treat
3621 // converted inputs as normal inputs.
3622 /** Widget input slots are handled in {@link layoutWidgetInputSlots} */
3623 if (this.widgets?.length && isWidgetInputSlot(slot)) continue
3624
3625 this.#measureSlot(slot, slotIndex, true)
3626 slots.push(slot)
3627 }
3628 for (const [slotIndex, slot] of this.#concreteOutputs.entries()) {
3629 this.#measureSlot(slot, slotIndex, false)
3630 slots.push(slot)
3631 }
3632
3633 return slots.length ? createBounds(slots, 0) : null
3634 }
3635
3636 #getMouseOverSlot(slot: INodeSlot): INodeSlot | null {
3637 const isInput = isINodeInputSlot(slot)

Callers 1

arrangeMethod · 0.95

Calls 3

#measureSlotMethod · 0.95
isWidgetInputSlotFunction · 0.90
createBoundsFunction · 0.90

Tested by

no test coverage detected