Fix node growing with DOM widgets when adding image even if enough space

This commit is contained in:
pythongosssss 2023-12-02 12:02:03 +00:00
parent 2995a24725
commit 28220fa839
2 changed files with 3 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;