[TS] Use strict mode in LGraphCanvas (#654)

- Prefer creating HTML elements in JS and `append()` over innerHTML &
`querySelector()`
- Removes redundant code
- Adds/fixes TS types
This commit is contained in:
filtered
2025-03-01 22:52:42 +11:00
committed by GitHub
parent bad923a7f0
commit c473130499
4 changed files with 74 additions and 78 deletions

View File

@@ -76,7 +76,7 @@ export class LiteGraphGlobal {
/** default node position */
DEFAULT_POSITION = [100, 100]
/** ,"circle" */
VALID_SHAPES = ["default", "box", "round", "card"]
VALID_SHAPES = ["default", "box", "round", "card"] satisfies ("default" | Lowercase<keyof typeof RenderShape>)[]
ROUND_RADIUS = 8
// shapes are used for nodes but also for slots