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

Method setValue

src/LGraphCanvas.ts:1313–1323  ·  view source on GitHub ↗
(value: NodeProperty)

Source from the content-addressed store, hash-verified

1311 }
1312
1313 function setValue(value: NodeProperty) {
1314 if (item.type == "Number") {
1315 value = Number(value)
1316 } else if (item.type == "Boolean") {
1317 value = Boolean(value)
1318 }
1319 // @ts-expect-error Requires refactor.
1320 node[property] = value
1321 dialog.remove()
1322 canvas.setDirty(true, true)
1323 }
1324 }
1325
1326 static getPropertyPrintableValue(value: unknown, values: unknown[] | object | undefined): string | undefined {

Callers

nothing calls this directly

Calls 4

setDirtyMethod · 0.80
oncloseMethod · 0.80
closeMethod · 0.65
removeMethod · 0.45

Tested by

no test coverage detected