Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Restored missing input edit fix

pythongosssss947e786c0a92
diff --git a/web/scripts/widgets.js b/web/scripts/widgets.js
index acda266f0..f2e094ae0 100644
--- a/web/scripts/widgets.js
+++ b/web/scripts/widgets.js
@@ -66,6 +66,22 @@ function addMultilineWidget(node, name, defaultVal, app) {
node.addCustomWidget(widget);
+ app.canvas.onDrawBackground = function () {
+ // Draw node isnt fired once the node is off the screen
+ // if it goes off screen quickly, the input may not be removed
+ // this shifts it off screen so it can be moved back if the node is visible.
+ for (let n in app.graph._nodes) {
+ n = graph._nodes[n];
+ for (let w in n.widgets) {
+ let wid = n.widgets[w];
+ if (Object.hasOwn(wid, "inputEl")) {
+ wid.inputEl.style.left = -8000 + "px";
+ wid.inputEl.style.position = "absolute";
+ }
+ }
+ }
+ };
+
node.onRemoved = function () {
// When removing this node we need to remove the input from the DOM
for (let y in this.widgets) {