mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 07:14:11 +00:00
[API] Return ContextMenu created for connecting link (#944)
Allows further customisation / hooks of the created ContextMenu.
This commit is contained in:
@@ -5510,7 +5510,7 @@ export class LGraphCanvas implements ConnectionColorContext {
|
||||
return false
|
||||
}
|
||||
|
||||
showConnectionMenu(optPass: Partial<ICreateNodeOptions & { e: MouseEvent }>): void {
|
||||
showConnectionMenu(optPass: Partial<ICreateNodeOptions & { e: MouseEvent }>): ContextMenu<string> | undefined {
|
||||
const opts = Object.assign<ICreateNodeOptions & HasShowSearchCallback, ICreateNodeOptions>({
|
||||
nodeFrom: null,
|
||||
slotFrom: null,
|
||||
@@ -5597,6 +5597,8 @@ export class LGraphCanvas implements ConnectionColorContext {
|
||||
callback: inner_clicked,
|
||||
})
|
||||
|
||||
return menu
|
||||
|
||||
// callback
|
||||
function inner_clicked(v: string | undefined, options: IContextMenuOptions<string, INodeInputSlot | INodeOutputSlot>, e: MouseEvent) {
|
||||
switch (v) {
|
||||
|
||||
Reference in New Issue
Block a user