From 66493d8cb4209e0ad19c914ae1e39ee7e1486d7e Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sun, 2 Mar 2025 16:56:59 +0900 Subject: [PATCH] formatting.. --- js/impact-pack.js | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/js/impact-pack.js b/js/impact-pack.js index a3c9468..608bdb4 100644 --- a/js/impact-pack.js +++ b/js/impact-pack.js @@ -223,29 +223,29 @@ api.addEventListener("executed", progressExecuteHandler); app.registerExtension({ name: "Comfy.Impack", - commands: [ - { - id: 'refresh-impact-wildcard', - label: 'Impact: Refresh Wildcard', - function: async () => { - await api.fetchApi('/impact/wildcards/refresh'); - await load_wildcards(); - app.extensionManager.toast.add({ - severity: 'info', - summary: 'Refreshed!', - detail: 'Impact Wildcard List is refreshed!!', - life: 3000 - }); - } - } - ], + commands: [ + { + id: 'refresh-impact-wildcard', + label: 'Impact: Refresh Wildcard', + function: async () => { + await api.fetchApi('/impact/wildcards/refresh'); + await load_wildcards(); + app.extensionManager.toast.add({ + severity: 'info', + summary: 'Refreshed!', + detail: 'Impact Wildcard List is refreshed!!', + life: 3000 + }); + } + } + ], - menuCommands: [ - { - path: ['Edit'], - commands: ['refresh-impact-wildcard'] - } - ], + menuCommands: [ + { + path: ['Edit'], + commands: ['refresh-impact-wildcard'] + } + ], loadedGraphNode(node, app) { if (node.comfyClass == "MaskPainter") { @@ -698,20 +698,20 @@ app.registerExtension({ break; } - node.widgets[combo_id+1].callback = (value, canvas, node, pos, e) => { - if(node) { + node.widgets[combo_id+1].callback = (value, canvas, node, pos, e) => { + if(node) { if(node.widgets[tbox_id].value != '') node.widgets[tbox_id].value += ', ' node.widgets[tbox_id].value += node._wildcard_value; - } - } + } + } Object.defineProperty(node.widgets[combo_id+1], "value", { set: (value) => { - if (value !== "Select the Wildcard to add to the text") - node._wildcard_value = value; - }, + if (value !== "Select the Wildcard to add to the text") + node._wildcard_value = value; + }, get: () => { return "Select the Wildcard to add to the text"; } });