[CodeHealth] Apply modern standards to LGraphCanvas (#650)

- Prefer template string
- Prefer explicit throw to undefined TypeError
- Remove unnecessary `this` assignment
This commit is contained in:
filtered
2025-03-01 09:08:23 +11:00
committed by GitHub
parent c4faaf4210
commit b36bf3d4a2
10 changed files with 102 additions and 127 deletions

View File

@@ -200,7 +200,7 @@ export class LGraphGroup implements Positionable, IPinnable, IColorable {
ctx.fill()
// Title
ctx.font = font_size + "px Arial"
ctx.font = `${font_size}px Arial`
ctx.textAlign = "left"
ctx.fillText(this.title + (this.pinned ? "📌" : ""), x + padding, y + font_size)