Show widget input inplace (#535)

* Show widget input inplace

* nit

* nit
This commit is contained in:
Chenlei Hu
2025-02-16 11:37:47 -05:00
committed by GitHub
parent 52a96a14d6
commit 1e71da9a38
3 changed files with 48 additions and 8 deletions

View File

@@ -4662,13 +4662,10 @@ export class LGraphCanvas implements ConnectionColorContext {
// render inputs and outputs
if (!node.collapsed) {
node.layoutSlots()
const slotsBounds = createBounds(
node.slots.map(slot => slot._layoutElement),
/** padding= */ 0,
)
const slotsBounds = node.layoutSlots()
const widgetStartY = slotsBounds ? slotsBounds[1] + slotsBounds[3] : 0
node.layoutWidgets({ widgetStartY })
node.layoutWidgetInputSlots()
node.drawSlots(ctx, {
connectingLink: this.connecting_links?.[0],