mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-19 06:20:10 +00:00
Fix widget sizing logic in LGraphCanvas and LGraphNode (#609)
This fixes an issue with widget heights not coinciding with actual computed heights. <img src="https://github.com/user-attachments/assets/50b4b86c-8de8-4844-9a17-6f18d32e7f5e" height="128" alt="old">old <img src="https://github.com/user-attachments/assets/c34e432a-6941-469e-99cd-df15c0a527de" height="256" alt="new">new
This commit is contained in:
@@ -1898,9 +1898,10 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
continue
|
||||
}
|
||||
|
||||
const h = widget.computeSize
|
||||
? widget.computeSize(nodeWidth)[1]
|
||||
: LiteGraph.NODE_WIDGET_HEIGHT
|
||||
const h = widget.computedHeight ??
|
||||
widget.computeSize?.(nodeWidth)[1] ??
|
||||
LiteGraph.NODE_WIDGET_HEIGHT
|
||||
|
||||
const w = widget.width || nodeWidth
|
||||
if (
|
||||
widget.last_y !== undefined &&
|
||||
|
||||
Reference in New Issue
Block a user