Skip to content

Commit

Permalink
Fix node growing with DOM widgets when adding image even if enough space
Browse files Browse the repository at this point in the history
  • Loading branch information
pythongosssss committed Dec 2, 2023
1 parent 2995a24 commit 28220fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion web/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export class ComfyApp {
node.prototype.setSizeForImage = function (force) {
if(!force && this.animatedImages) return;

if (this.inputHeight) {
if (this.inputHeight || this.freeWidgetSpace > 210) {
this.setSize(this.size);
return;
}
Expand Down
2 changes: 2 additions & 0 deletions web/scripts/domWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ function computeSize(size) {
freeSpace -= 220;
}

this.freeWidgetSpace = freeSpace;

if (freeSpace < 0) {
// Not enough space for all widgets so we need to grow
size[1] -= freeSpace;
Expand Down

0 comments on commit 28220fa

Please sign in to comment.