Skip to content

Commit 3bf3081

Browse files
committed
https://github.com/rgthree/rgthree-comfy/pull/379
1 parent 0e7d41c commit 3bf3081

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src_web/comfyui/utils_widgets.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ export abstract class RgthreeBaseWidget<T> implements IWidget<T, any> {
199199
*/
200200
export class RgthreeBetterButtonWidget extends RgthreeBaseWidget<string> {
201201
value: string = "";
202+
readonly type = "RgthreeBetterButtonWidget";
202203
mouseUpCallback: (event: AdjustedMouseEvent, pos: Vector2, node: LGraphNode) => boolean | void;
203204

204205
constructor(
@@ -224,6 +225,7 @@ export class RgthreeBetterButtonWidget extends RgthreeBaseWidget<string> {
224225
export class RgthreeBetterTextWidget implements IWidget<string> {
225226
name: string;
226227
value: string;
228+
readonly type = "RgthreeBetterTextWidget";
227229

228230
constructor(name: string, value: string) {
229231
this.name = name;
@@ -267,6 +269,7 @@ export class RgthreeDividerWidget implements IWidget<null> {
267269
options = { serialize: false };
268270
value = null;
269271
name = "divider";
272+
readonly type = "RgthreeDividerWidget";
270273

271274
private readonly widgetOptions: RgthreeDividerWidgetOptions = {
272275
marginTop: 7,
@@ -320,6 +323,7 @@ export class RgthreeLabelWidget implements IWidget<null> {
320323
options = { serialize: false };
321324
value = null;
322325
name: string;
326+
readonly type = "RgthreeLabelWidget"
323327

324328
private readonly widgetOptions: RgthreeLabelWidgetOptions = {};
325329
private posY: number = 0;

web/comfyui/utils_widgets.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export class RgthreeBetterButtonWidget extends RgthreeBaseWidget {
106106
constructor(name, mouseUpCallback) {
107107
super(name);
108108
this.value = "";
109+
this.type = "RgthreeBetterButtonWidget";
109110
this.mouseUpCallback = mouseUpCallback;
110111
}
111112
draw(ctx, node, width, y, height) {
@@ -117,6 +118,7 @@ export class RgthreeBetterButtonWidget extends RgthreeBaseWidget {
117118
}
118119
export class RgthreeBetterTextWidget {
119120
constructor(name, value) {
121+
this.type = "RgthreeBetterTextWidget";
120122
this.name = name;
121123
this.value = value;
122124
}
@@ -140,6 +142,7 @@ export class RgthreeDividerWidget {
140142
this.options = { serialize: false };
141143
this.value = null;
142144
this.name = "divider";
145+
this.type = "RgthreeDividerWidget";
143146
this.widgetOptions = {
144147
marginTop: 7,
145148
marginBottom: 7,
@@ -170,6 +173,7 @@ export class RgthreeLabelWidget {
170173
constructor(name, widgetOptions) {
171174
this.options = { serialize: false };
172175
this.value = null;
176+
this.type = "RgthreeLabelWidget";
173177
this.widgetOptions = {};
174178
this.posY = 0;
175179
this.name = name;

0 commit comments

Comments
 (0)