Open martin-rizzo opened 2 months ago
This also applies to Primitive nodes. It's caused by LiteGraph's default behaviour - shrink nodes to to the "right" size whenever a widget is added (iirc, it just calls computeSize
+ setSize
).
As undo reloads the workflow, this also triggers it. I wrote a quick and ugly workaround, so never bothered fixing it properly:
const addWidget = LGraphNode.prototype.addWidget
LGraphNode.prototype.addWidget = function (type, name, value, callback, options) {
const size = this.size
const w = addWidget.apply(this, arguments)
if (size) {
size[0] = Math.max(size[0], this.size[0])
size[1] = Math.max(size[1], this.size[1])
}
this.setSize(size)
return w
}
Not a solution - it introduces its own annoying behaviour.
Frontend Version
v1.2.44
Expected Behavior
When saving a workflow to a .json file and reloading it, 'Reroute' nodes should retain their original size, ensuring that the name the user has given to the slot remains visible.
Actual Behavior
After saving the workflow to a .json file and reloading it, the 'Reroute' nodes become smaller. This change not only alters the workflow layout but also results in a size so small that the slot name exceeds the node's boundaries, making it difficult to read.
Steps to Reproduce
Debug Logs
Browser Logs
-
What browsers do you use to access the UI ?
Google Chrome
Other
This issue seems to be related to this previous bug: https://github.com/Comfy-Org/ComfyUI_frontend/issues/676.