Implement ComboWidget (#480)

* wip

* Implement onClick
This commit is contained in:
Chenlei Hu
2025-02-08 15:16:15 -05:00
committed by GitHub
parent fcc09c075d
commit c781053bd2
3 changed files with 220 additions and 57 deletions

View File

@@ -33,6 +33,7 @@ import { type LGraphNodeConstructor, LiteGraph } from "./litegraph"
import { isInRectangle, isInRect, snapPoint } from "./measure"
import { LLink } from "./LLink"
import { BooleanWidget } from "./widgets/BooleanWidget"
import { ComboWidget } from "./widgets/ComboWidget"
import { NodeInputSlot, NodeOutputSlot } from "./NodeSlot"
export type NodeId = number | string
@@ -1671,6 +1672,9 @@ export class LGraphNode implements Positionable, IPinnable {
case "toggle":
widget = new BooleanWidget(custom_widget)
break
case "combo":
widget = new ComboWidget(custom_widget)
break
default:
widget = custom_widget
}