Skip to content

Commit

Permalink
Update litegraph (Proper collapsed node handling)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Sep 12, 2024
1 parent fa9a415 commit c44d0c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.2.1",
"@comfyorg/litegraph": "^0.7.70",
"@comfyorg/litegraph": "^0.7.71",
"@primevue/themes": "^4.0.5",
"@vitejs/plugin-vue": "^5.0.5",
"@vueuse/core": "^11.0.0",
Expand Down
7 changes: 2 additions & 5 deletions src/components/graph/TitleEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,8 @@ watch(
inputStyle.value.fontSize = `${fontSize}px`
} else if (target instanceof LGraphNode) {
const node = target
const isCollapsed = node.flags?.collapsed
const [x, y, nodeWidth, nodeHeight] = node.getBounding()
const canvasWidth =
// @ts-expect-error Remove after collapsed_width is exposed in LiteGraph
isCollapsed && node._collapsed_width ? node._collapsed_width : nodeWidth
const [x, y] = node.getBounding()
const canvasWidth = node.width
const canvasHeight = LiteGraph.NODE_TITLE_HEIGHT
const [left, top] = app.canvasPosToClientPos([x, y])
Expand Down

0 comments on commit c44d0c6

Please sign in to comment.