Add support for LiteGraph to convert to classes (#334)

* Add support for LiteGraph to convert to classes

* Fix large context menu search regression

* Remove debug code

* Fix regression from rename & prototype change

* Fix super() calls to match LGraphNode
This commit is contained in:
filtered
2024-08-11 23:46:54 +10:00
committed by GitHub
parent 0f3b58b610
commit e2141a81e2
7 changed files with 49 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
}
}