Skip to content

Commit

Permalink
Add default group colour option
Browse files Browse the repository at this point in the history
LiteGraph.DEFAULT_GROUP_COLOR must be configured to make use of this change.
  • Loading branch information
webfiltered committed Oct 28, 2024
1 parent 4c6e6ad commit 204e0ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LGraphGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ export class LGraphGroup {
draw(graphCanvas: LGraphCanvas, ctx: CanvasRenderingContext2D): void {
const padding = 4

ctx.fillStyle = this.color
ctx.strokeStyle = this.color
ctx.fillStyle = this.color ?? LiteGraph.DEFAULT_GROUP_COLOR
ctx.strokeStyle = this.color ?? LiteGraph.DEFAULT_GROUP_COLOR
const [x, y] = this._pos
const [width, height] = this._size
ctx.globalAlpha = 0.25 * graphCanvas.editor_alpha
Expand Down
1 change: 1 addition & 0 deletions src/LiteGraphGlobal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class LiteGraphGlobal {
DEFAULT_SHADOW_COLOR = "rgba(0,0,0,0.5)"
DEFAULT_GROUP_FONT = 24
DEFAULT_GROUP_FONT_SIZE?: any
DEFAULT_GROUP_COLOR?: string

WIDGET_BGCOLOR = "#222"
WIDGET_OUTLINE_COLOR = "#666"
Expand Down

0 comments on commit 204e0ef

Please sign in to comment.