mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-04 05:02:17 +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:
@@ -495,6 +495,7 @@ export class LGraphNode
|
||||
}
|
||||
|
||||
set shape(v: RenderShape | 'default' | 'box' | 'round' | 'circle' | 'card') {
|
||||
const oldValue = this._shape
|
||||
switch (v) {
|
||||
case 'default':
|
||||
this._shape = undefined
|
||||
@@ -514,6 +515,14 @@ export class LGraphNode
|
||||
default:
|
||||
this._shape = v
|
||||
}
|
||||
if (oldValue !== this._shape) {
|
||||
this.graph?.trigger('node:property:changed', {
|
||||
nodeId: this.id,
|
||||
property: 'shape',
|
||||
oldValue,
|
||||
newValue: this._shape
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user