Add Disconnect Links option to input slot menu (#901)

This commit is contained in:
filtered
2025-04-07 01:22:19 +10:00
committed by GitHub
parent 0032675e00
commit 3815296ab5

View File

@@ -7102,8 +7102,9 @@ export class LGraphCanvas implements ConnectionColorContext {
if (node.getSlotMenuOptions) {
menu_info = node.getSlotMenuOptions(slot)
} else {
if (slot?.output?.links?.length)
if (slot.output?.links?.length || slot.input?.link != null) {
menu_info.push({ content: "Disconnect Links", slot })
}
const _slot = slot.input || slot.output
if (!_slot) throw new TypeError("Both in put and output slots were null when processing context menu.")