fix: add getSlotMenuOptions to BranchNode for slot rename

The default slot context menu skips "Rename Slot" for inputs that have
a widget property set. Override getSlotMenuOptions on BranchNode to
always show the rename option for input slots.
This commit is contained in:
Arthur R Longbottom
2026-03-27 19:06:36 -05:00
parent bd596997b8
commit 9f70912899

View File

@@ -175,6 +175,15 @@ function onBranchSelectorCreated(this: LGraphNode) {
}
})
// Allow renaming autogrow input slots via context menu
this.getSlotMenuOptions = (slot) => {
const menu: { content: string; slot: typeof slot }[] = []
if (slot.input) {
menu.push({ content: 'Rename Slot', slot })
}
return menu
}
refreshBranchValues()
}