Image and radio widgets
This commit is contained in:
@@ -17,7 +17,15 @@ export type DefaultWidgetLayout = {
|
||||
inputs?: Record<number, DefaultWidgetSpec>,
|
||||
}
|
||||
|
||||
export interface ComfyGraphNodeProperties extends Record<string, any> {
|
||||
tags: string[]
|
||||
}
|
||||
|
||||
export default class ComfyGraphNode extends LGraphNode {
|
||||
override properties: ComfyGraphNodeProperties = {
|
||||
tags: []
|
||||
}
|
||||
|
||||
isBackendNode?: boolean;
|
||||
|
||||
beforeQueued?(subgraph: string | null): void;
|
||||
@@ -58,6 +66,11 @@ export default class ComfyGraphNode extends LGraphNode {
|
||||
return null;
|
||||
}
|
||||
|
||||
constructor(title?: string) {
|
||||
super(title)
|
||||
this.addProperty("tags", [], "array")
|
||||
}
|
||||
|
||||
private inheritSlotTypes(type: LConnectionKind, isConnected: boolean) {
|
||||
// Prevent multiple connections to different types when we have no input
|
||||
if (isConnected && type === LConnectionKind.OUTPUT) {
|
||||
@@ -261,6 +274,7 @@ export default class ComfyGraphNode extends LGraphNode {
|
||||
comfyInput.defaultWidgetNode = widgetNode.class as any
|
||||
}
|
||||
}
|
||||
|
||||
this.saveUserState = (o as any).saveUserState;
|
||||
if (this.saveUserState == null)
|
||||
this.saveUserState = true
|
||||
|
||||
Reference in New Issue
Block a user