Skip to content

Commit

Permalink
bugfix: image widget's was mis-aligned when node has multiline widget
Browse files Browse the repository at this point in the history
  • Loading branch information
ltdrdata committed Jul 7, 2023
1 parent c2d407b commit d43cff2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,11 @@ export class ComfyApp {
shiftY = w.last_y;
if (w.computeSize) {
shiftY += w.computeSize()[1] + 4;
} else {
}
else if(w.computedHeight) {
shiftY += w.computedHeight;
}
else {
shiftY += LiteGraph.NODE_WIDGET_HEIGHT + 4;
}
} else {
Expand Down
1 change: 1 addition & 0 deletions web/scripts/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ function addMultilineWidget(node, name, opts, app) {
w.y = y;
if (w.type === "customtext") {
y += freeSpace;
w.computedHeight = freeSpace - multi.length*4;
} else if (w.computeSize) {
y += w.computeSize()[1] + 4;
} else {
Expand Down

0 comments on commit d43cff2

Please sign in to comment.