mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
Fix double click primitive widgets with subgraphs (#5372)
Double clicking the input slot of a node creates and connects a primitive widget. However, this code would always add the created primitive to the root graph.
This commit is contained in:
@@ -593,7 +593,7 @@ app.registerExtension({
|
|||||||
const node = LiteGraph.createNode('PrimitiveNode')
|
const node = LiteGraph.createNode('PrimitiveNode')
|
||||||
if (!node) return r
|
if (!node) return r
|
||||||
|
|
||||||
app.graph.add(node)
|
this.graph?.add(node)
|
||||||
|
|
||||||
// Calculate a position that wont directly overlap another node
|
// Calculate a position that wont directly overlap another node
|
||||||
const pos: [number, number] = [
|
const pos: [number, number] = [
|
||||||
|
|||||||
Reference in New Issue
Block a user