Checkbox widget

This commit is contained in:
space-nuko
2023-05-06 19:53:33 -05:00
parent 0cf675f847
commit 707d6174dd
10 changed files with 210 additions and 32 deletions

View File

@@ -112,7 +112,7 @@ export class ComfyCopyAction extends ComfyGraphNode {
{ name: "copy", type: BuiltInSlotType.ACTION }
],
outputs: [
{ name: "out", type: "*" }
{ name: "out", type: BuiltInSlotType.EVENT }
],
}
@@ -130,13 +130,15 @@ export class ComfyCopyAction extends ComfyGraphNode {
}
override onExecute() {
this.setProperty("value", this.getInputData(0))
if (this.getInputLink(0))
this.setProperty("value", this.getInputData(0))
}
override onAction(action: any, param: any) {
this.setProperty("value", this.getInputData(0))
this.setOutputData(0, this.properties.value)
console.log("setData", this.properties.value)
if (action === "copy") {
this.setProperty("value", this.getInputData(0))
this.triggerSlot(0, this.properties.value)
}
};
}