Simplify LGraphNode.onDrawBackground signature (#463)

This commit is contained in:
Chenlei Hu
2025-02-04 08:53:49 -08:00
committed by GitHub
parent 5acb656b15
commit c900df750e
2 changed files with 1 additions and 4 deletions

View File

@@ -5174,7 +5174,7 @@ export class LGraphCanvas {
}
ctx.shadowColor = "transparent"
node.onDrawBackground?.(ctx, this, this.canvas, this.graph_mouse)
node.onDrawBackground?.(ctx)
// Title bar background (remember, it is rendered ABOVE the node)
if (render_title || title_mode == TitleMode.TRANSPARENT_TITLE) {

View File

@@ -411,9 +411,6 @@ export class LGraphNode implements Positionable, IPinnable {
onDrawBackground?(
this: LGraphNode,
ctx: CanvasRenderingContext2D,
canvas: LGraphCanvas,
canvasElement: HTMLCanvasElement,
mousePosition: Point,
): void
onNodeCreated?(this: LGraphNode): void
/**