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

Method drawProgressBar

src/LGraphNode.ts:3841–3853  ·  view source on GitHub ↗

* Draws a progress bar on the node. * @param ctx The canvas context to draw on

(ctx: CanvasRenderingContext2D)

Source from the content-addressed store, hash-verified

3839 * @param ctx The canvas context to draw on
3840 */
3841 drawProgressBar(ctx: CanvasRenderingContext2D): void {
3842 if (!this.progress) return
3843
3844 const originalFillStyle = ctx.fillStyle
3845 ctx.fillStyle = "green"
3846 ctx.fillRect(
3847 0,
3848 0,
3849 this.width * this.progress,
3850 6,
3851 )
3852 ctx.fillStyle = originalFillStyle
3853 }
3854}

Callers 1

drawNodeShapeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected