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

Method collapse

src/LGraphNode.ts:3170–3176  ·  view source on GitHub ↗

* Toggle node collapse (makes it smaller on the canvas)

(force?: boolean)

Source from the content-addressed store, hash-verified

3168 * Toggle node collapse (makes it smaller on the canvas)
3169 */
3170 collapse(force?: boolean): void {
3171 if (!this.collapsible && !force) return
3172 if (!this.graph) throw new NullGraphError()
3173 this.graph._version++
3174 this.flags.collapsed = !this.flags.collapsed
3175 this.setDirtyCanvas(true, true)
3176 }
3177
3178 /**
3179 * Toggles advanced mode of the node, showing advanced widgets

Callers 2

fApplyMultiNodeMethod · 0.80
#processNodeClickMethod · 0.80

Calls 1

setDirtyCanvasMethod · 0.95

Tested by

no test coverage detected