"git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "f8441cffa4219dddb9bea07bed558e1c13878832"
Commit 422163c2 authored by Dr.Lt.Data's avatar Dr.Lt.Data
Browse files

bugfix: Fixing the calculation issue when an image widget is added to the size...

bugfix: Fixing the calculation issue when an image widget is added to the size calculation of the text widget.
parent a3a713b6
...@@ -365,6 +365,10 @@ export class ComfyApp { ...@@ -365,6 +365,10 @@ export class ComfyApp {
} }
node.prototype.setSizeForImage = function () { node.prototype.setSizeForImage = function () {
if (this.inputHeight) {
this.setSize(this.size);
return;
}
const minHeight = getImageTop(this) + 220; const minHeight = getImageTop(this) + 220;
if (this.size[1] < minHeight) { if (this.size[1] < minHeight) {
this.setSize([this.size[0], minHeight]); this.setSize([this.size[0], minHeight]);
......
...@@ -115,12 +115,12 @@ function addMultilineWidget(node, name, opts, app) { ...@@ -115,12 +115,12 @@ function addMultilineWidget(node, name, opts, app) {
// See how large each text input can be // See how large each text input can be
freeSpace -= widgetHeight; freeSpace -= widgetHeight;
freeSpace /= multi.length; freeSpace /= multi.length + (!!node.imgs?.length);
if (freeSpace < MIN_SIZE) { if (freeSpace < MIN_SIZE) {
// There isnt enough space for all the widgets, increase the size of the node // There isnt enough space for all the widgets, increase the size of the node
freeSpace = MIN_SIZE; freeSpace = MIN_SIZE;
node.size[1] = y + widgetHeight + freeSpace * multi.length; node.size[1] = y + widgetHeight + freeSpace * (multi.length + (!!node.imgs?.length));
node.graph.setDirtyCanvas(true); node.graph.setDirtyCanvas(true);
} }
......
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