Relands "Add support for LiteGraph to convert to classes" (#667)

* Revert "Revert "Add support for LiteGraph to convert to classes (#334)" (#386)"

This reverts commit d607f6c7f7.

* Format
This commit is contained in:
Chenlei Hu
2024-08-28 15:35:05 -04:00
committed by GitHub
parent 4e8acf6c77
commit 6f9d2bfa17
7 changed files with 48 additions and 37 deletions

View File

@@ -14,6 +14,13 @@ declare module '@comfyorg/litegraph' {
* If the node is a frontend only node and should not be serialized into the prompt.
*/
isVirtualNode?: boolean
addDOMWidget(
name: string,
type: string,
element: HTMLElement,
options: Record<string, any>
): DOMWidget
}
interface IWidget<TValue = any, TOptions = any> {
@@ -67,4 +74,8 @@ declare module '@comfyorg/litegraph' {
slotPos: Vector2
): number
}
interface ContextMenu {
root?: HTMLDivElement
}
}