"benchmark/git@developer.sourcefind.cn:change/sglang.git" did not exist on "33f0de337d978b37c63b98575b4962c6e6479e8c"
Commit 9d095c52 authored by omar92's avatar omar92
Browse files

handle double click create primitive widget

parent 2dc7257e
...@@ -159,7 +159,12 @@ app.registerExtension({ ...@@ -159,7 +159,12 @@ app.registerExtension({
const r = origOnInputDblClick ? origOnInputDblClick.apply(this, arguments) : undefined; const r = origOnInputDblClick ? origOnInputDblClick.apply(this, arguments) : undefined;
const input = this.inputs[slot]; const input = this.inputs[slot];
if (input.widget && !input[ignoreDblClick]) { if (!input.widget || !input[ignoreDblClick])// Not a widget input or already handled input
{
if (!(input.type in ComfyWidgets)) return r;//also Not a ComfyWidgets input (do nothing)
}
// Create a primitive node
const node = LiteGraph.createNode("PrimitiveNode"); const node = LiteGraph.createNode("PrimitiveNode");
app.graph.add(node); app.graph.add(node);
...@@ -178,7 +183,6 @@ app.registerExtension({ ...@@ -178,7 +183,6 @@ app.registerExtension({
setTimeout(() => { setTimeout(() => {
delete input[ignoreDblClick]; delete input[ignoreDblClick];
}, 300); }, 300);
}
return r; return r;
}; };
...@@ -265,7 +269,6 @@ app.registerExtension({ ...@@ -265,7 +269,6 @@ app.registerExtension({
const widget = _widget; const widget = _widget;
const { type, linkType } = getWidgetType(widget.config); const { type, linkType } = getWidgetType(widget.config);
console.log({ "input": input });
// Update our output to restrict to the widget type // Update our output to restrict to the widget type
this.outputs[0].type = linkType; this.outputs[0].type = linkType;
this.outputs[0].name = type; this.outputs[0].name = type;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment