From c5901bb438b0b9cf7911d49b657c376865cd118d Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 1 Mar 2026 00:06:19 +0100 Subject: [PATCH] Fix: set output label alongside name for LiteGraph rendering --- web/json_dynamic.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/json_dynamic.js b/web/json_dynamic.js index 6a74b1c..26441f6 100644 --- a/web/json_dynamic.js +++ b/web/json_dynamic.js @@ -87,7 +87,7 @@ app.registerExtension({ delete oldSlots[key]; } else { // New key — create a fresh slot - newOutputs.push({ name: key, type: type, links: null }); + newOutputs.push({ name: key, label: key, type: type, links: null }); } } @@ -189,6 +189,7 @@ app.registerExtension({ if (keys.length > 0) { for (let i = 0; i < this.outputs.length && i < keys.length; i++) { this.outputs[i].name = keys[i].trim(); + this.outputs[i].label = keys[i].trim(); if (types[i]) this.outputs[i].type = types[i]; } while (this.outputs.length > keys.length) { @@ -205,10 +206,10 @@ app.registerExtension({ } // === DIAGNOSTIC (remove after debugging) === - console.log("[JDL-DEBUG] this.outputs AFTER RENAME:", JSON.stringify(this.outputs?.map(o => ({name: o.name, type: o.type})))); + console.log("[JDL-DEBUG] this.outputs AFTER RENAME:", JSON.stringify(this.outputs?.map(o => ({name: o.name, label: o.label, type: o.type})))); const _node = this; setTimeout(() => { - console.log("[JDL-DEBUG] this.outputs 1s LATER:", JSON.stringify(_node.outputs?.map(o => ({name: o.name, type: o.type})))); + console.log("[JDL-DEBUG] this.outputs 1s LATER:", JSON.stringify(_node.outputs?.map(o => ({name: o.name, label: o.label, type: o.type})))); }, 1000); // === END DIAGNOSTIC ===