+
-
- UI Edit mode
-
-
-
- Theme
-
-
+
+
diff --git a/src/lib/nodes/widgets/ComfyComboNode.ts b/src/lib/nodes/widgets/ComfyComboNode.ts
index de6fedd..5373298 100644
--- a/src/lib/nodes/widgets/ComfyComboNode.ts
+++ b/src/lib/nodes/widgets/ComfyComboNode.ts
@@ -162,6 +162,8 @@ export default class ComfyComboNode extends ComfyWidgetNode {
override stripUserState(o: SerializedLGraphNode) {
super.stripUserState(o);
o.properties.values = []
+ o.properties.defaultValue = null;
+ (o as any).comfyValue = null
}
}
diff --git a/src/lib/nodes/widgets/ComfyWidgetNode.ts b/src/lib/nodes/widgets/ComfyWidgetNode.ts
index 6be6872..9c8ca01 100644
--- a/src/lib/nodes/widgets/ComfyWidgetNode.ts
+++ b/src/lib/nodes/widgets/ComfyWidgetNode.ts
@@ -355,7 +355,6 @@ export default abstract class ComfyWidgetNode extends ComfyGraphNode {
override stripUserState(o: SerializedLGraphNode) {
super.stripUserState(o);
- (o as any).comfyValue = this.defaultValue;
- o.properties.defaultValue = null;
+ (o as any).comfyValue = this.properties.defaultValue;
}
}
diff --git a/src/lib/stores/layoutStates.ts b/src/lib/stores/layoutStates.ts
index a460bae..3f9fd54 100644
--- a/src/lib/stores/layoutStates.ts
+++ b/src/lib/stores/layoutStates.ts
@@ -525,7 +525,37 @@ const ALL_ATTRIBUTES: AttributesSpecList = [
canShow: (di: IDragItem) => di.type === "container"
},
+ // Combo
+ {
+ name: "defaultValue",
+ type: "string",
+ location: "nodeProps",
+ editable: true,
+ defaultValue: "A",
+ validNodeTypes: ["ui/combo"],
+ },
+
+ // Checkbox
+ {
+ name: "defaultValue",
+ type: "boolean",
+ location: "nodeProps",
+ editable: true,
+ defaultValue: true,
+ validNodeTypes: ["ui/checkbox"],
+ },
+
// Range
+ {
+ name: "defaultValue",
+ type: "number",
+ location: "nodeProps",
+ editable: true,
+ defaultValue: 0,
+ min: -2 ^ 16,
+ max: 2 ^ 16,
+ validNodeTypes: ["ui/number"],
+ },
{
name: "min",
type: "number",
@@ -587,6 +617,14 @@ const ALL_ATTRIBUTES: AttributesSpecList = [
},
// Radio
+ {
+ name: "defaultValue",
+ type: "string",
+ location: "nodeProps",
+ editable: true,
+ defaultValue: "Choice A",
+ validNodeTypes: ["ui/radio"],
+ },
{
name: "choices",
type: "string",
@@ -598,6 +636,16 @@ const ALL_ATTRIBUTES: AttributesSpecList = [
deserialize: deserializeStringArray,
},
+ // Text
+ {
+ name: "defaultValue",
+ type: "string",
+ location: "nodeProps",
+ editable: true,
+ defaultValue: "",
+ validNodeTypes: ["ui/text"],
+ },
+
// Workflow
{
name: "title",