Add litegraph input indicator helper class (#842)

Example usage with ComfyUI_frontend, via console / devtools:

```ts
const inputIndicators = new InputIndicators(app.canvas)
// Dispose:
inputIndicators.dispose()
```
This commit is contained in:
filtered
2025-03-24 11:43:36 +11:00
committed by GitHub
parent 361ae2c589
commit c8bd5e43dd
4 changed files with 171 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import type { Dictionary, ISlotType, Rect, WhenNullish } from "./interfaces"
import { InputIndicators } from "./canvas/InputIndicators"
import { ContextMenu } from "./ContextMenu"
import { CurveEditor } from "./CurveEditor"
import { DragAndScale } from "./DragAndScale"
@@ -270,6 +271,7 @@ export class LiteGraphGlobal {
ContextMenu = ContextMenu
CurveEditor = CurveEditor
Reroute = Reroute
InputIndicators = InputIndicators
onNodeTypeRegistered?(type: string, base_class: typeof LGraphNode): void
onNodeTypeReplaced?(type: string, base_class: typeof LGraphNode, prev: unknown): void