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

Method expandToFitContent

src/LGraphNode.ts:1451–1457  ·  view source on GitHub ↗

* Expands the node size to fit its content.

()

Source from the content-addressed store, hash-verified

1449 * Expands the node size to fit its content.
1450 */
1451 expandToFitContent(): void {
1452 const newSize = this.computeSize()
1453 this.setSize([
1454 Math.max(this.size[0], newSize[0]),
1455 Math.max(this.size[1], newSize[1]),
1456 ])
1457 }
1458
1459 /**
1460 * add a new property to this node

Callers 4

addOutputMethod · 0.95
addInputMethod · 0.95
addWidgetMethod · 0.95
toggleAdvancedMethod · 0.95

Calls 2

computeSizeMethod · 0.95
setSizeMethod · 0.95

Tested by

no test coverage detected