mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-06-09 23:57:14 +00:00
Remove initial call as now unnecessary
Set canvas to dirty if we grow the node
This commit is contained in:
parent
2b94dee3da
commit
76f4d65d79
@ -62,6 +62,7 @@ function addMultilineWidget(node, name, opts, app) {
|
|||||||
// 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.graph.setDirtyCanvas(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Position each of the widgets
|
// Position each of the widgets
|
||||||
@ -151,7 +152,7 @@ function addMultilineWidget(node, name, opts, app) {
|
|||||||
if (!(MultilineSymbol in node)) {
|
if (!(MultilineSymbol in node)) {
|
||||||
node[MultilineSymbol] = true;
|
node[MultilineSymbol] = true;
|
||||||
const onResize = node.onResize;
|
const onResize = node.onResize;
|
||||||
|
|
||||||
node.onResize = function (size) {
|
node.onResize = function (size) {
|
||||||
computeSize(size);
|
computeSize(size);
|
||||||
|
|
||||||
@ -160,11 +161,6 @@ function addMultilineWidget(node, name, opts, app) {
|
|||||||
onResize.apply(this, arguments);
|
onResize.apply(this, arguments);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
requestAnimationFrame(() => {
|
|
||||||
computeSize(node.size);
|
|
||||||
app.graph.setDirtyCanvas(true);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return { minWidth: 400, minHeight: 200, widget };
|
return { minWidth: 400, minHeight: 200, widget };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user