Commit 28220fa8 authored by pythongosssss's avatar pythongosssss
Browse files

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

parent 2995a247
...@@ -411,7 +411,7 @@ export class ComfyApp { ...@@ -411,7 +411,7 @@ export class ComfyApp {
node.prototype.setSizeForImage = function (force) { node.prototype.setSizeForImage = function (force) {
if(!force && this.animatedImages) return; if(!force && this.animatedImages) return;
if (this.inputHeight) { if (this.inputHeight || this.freeWidgetSpace > 210) {
this.setSize(this.size); this.setSize(this.size);
return; return;
} }
......
...@@ -120,6 +120,8 @@ function computeSize(size) { ...@@ -120,6 +120,8 @@ function computeSize(size) {
freeSpace -= 220; freeSpace -= 220;
} }
this.freeWidgetSpace = freeSpace;
if (freeSpace < 0) { if (freeSpace < 0) {
// Not enough space for all widgets so we need to grow // Not enough space for all widgets so we need to grow
size[1] -= freeSpace; size[1] -= freeSpace;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment