Sync widget changes

This commit is contained in:
pythongosssss 2023-03-24 10:27:19 +00:00
parent bb00176731
commit b13539c3dd

View File

@ -251,6 +251,16 @@ app.registerExtension({
addRandomizeWidget(this, widget, "Random after every gen");
}
// When our value changes, update other widgets to reflect our changes
// e.g. so LoadImage shows correct image
const callback = widget.callback;
const self = this;
widget.callback = function () {
const r = callback ? callback.apply(this, arguments) : undefined;
self.applyToGraph();
return r;
};
// Grow our node if required
const sz = this.computeSize();
if (this.size[0] < sz[0]) {