mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-09 07:00:06 +00:00
[Refactor] Move Widget.beforeQueued invocation from graphToPrompt to queuePrompt (#2667)
This commit is contained in:
@@ -42,3 +42,14 @@ export const getItemsColorOption = (items: unknown[]): ColorOption | null => {
|
||||
? _.head(colorOptions)!
|
||||
: null
|
||||
}
|
||||
|
||||
export function executeWidgetsCallback(
|
||||
nodes: LGraphNode[],
|
||||
callbackName: 'onRemove' | 'beforeQueued' | 'afterQueued'
|
||||
) {
|
||||
for (const node of nodes) {
|
||||
for (const widget of node.widgets ?? []) {
|
||||
widget[callbackName]?.()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user