mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 22:09:55 +00:00
Fix node title editor's width when node is collapsed (#671)
* Fix node title editor's width when node is collapsed * nit
This commit is contained in:
@@ -54,9 +54,12 @@ const extension: ComfyExtension = {
|
||||
editedTitle.value = this.title
|
||||
showInput.value = true
|
||||
|
||||
const isCollapsed = node.flags?.collapsed
|
||||
const [x1, y1, x2, y2] = this.getBounding()
|
||||
const [nodeWidth, nodeHeight] = this.size
|
||||
const canvasWidth = nodeWidth
|
||||
const canvasWidth =
|
||||
// @ts-expect-error Remove after collapsed_width is exposed in LiteGraph
|
||||
isCollapsed && node._collapsed_width ? node._collapsed_width : nodeWidth
|
||||
const canvasHeight = LiteGraph.NODE_TITLE_HEIGHT
|
||||
|
||||
const [left, top] = app.canvasPosToClientPos([x1, y1])
|
||||
|
||||
Reference in New Issue
Block a user