mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-14 09:27:41 +00:00
fix: node shape not reactive in vueNodes mode (#7302)
## Summary add node shape support in vueNodes fix https://github.com/Comfy-Org/ComfyUI_frontend/issues/7144 ## Screenshots (if applicable) https://github.com/user-attachments/assets/df8a4fa6-5686-435d-a814-4fe3990f7e69 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7302-fix-node-shape-not-reactive-in-vueNodes-mode-2c56d73d3650811c9ef5e4fe49c94f55) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -69,6 +69,7 @@ export interface VueNodeData {
|
||||
}
|
||||
color?: string
|
||||
bgcolor?: string
|
||||
shape?: number
|
||||
}
|
||||
|
||||
export interface GraphNodeManager {
|
||||
@@ -234,7 +235,8 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager {
|
||||
outputs: node.outputs ? [...node.outputs] : undefined,
|
||||
flags: node.flags ? { ...node.flags } : undefined,
|
||||
color: node.color || undefined,
|
||||
bgcolor: node.bgcolor || undefined
|
||||
bgcolor: node.bgcolor || undefined,
|
||||
shape: node.shape
|
||||
}
|
||||
}
|
||||
|
||||
@@ -571,6 +573,15 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager {
|
||||
? propertyEvent.newValue
|
||||
: undefined
|
||||
})
|
||||
break
|
||||
case 'shape':
|
||||
vueNodeData.set(nodeId, {
|
||||
...currentData,
|
||||
shape:
|
||||
typeof propertyEvent.newValue === 'number'
|
||||
? propertyEvent.newValue
|
||||
: undefined
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user