Skip to content

Commit

Permalink
Merge branch 'widget-input-overlapping' of https://github.com/ssitu/C…
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jun 21, 2023
2 parents 6f0f8aa + 8c3d244 commit 852cf4d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/extensions/core/widgetInputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ function convertToInput(node, widget, config) {
widget: { name: widget.name, config },
});

for (const widget of node.widgets) {
widget.last_y += LiteGraph.NODE_SLOT_HEIGHT;
}

// Restore original size but grow if needed
node.setSize([Math.max(sz[0], node.size[0]), Math.max(sz[1], node.size[1])]);
}
Expand All @@ -68,6 +72,10 @@ function convertToWidget(node, widget) {
const sz = node.size;
node.removeInput(node.inputs.findIndex((i) => i.widget?.name === widget.name));

for (const widget of node.widgets) {
widget.last_y -= LiteGraph.NODE_SLOT_HEIGHT;
}

// Restore original size but grow if needed
node.setSize([Math.max(sz[0], node.size[0]), Math.max(sz[1], node.size[1])]);
}
Expand Down

0 comments on commit 852cf4d

Please sign in to comment.