From 7e05de431bc9529ae6a0bfd25e76c1f5e837cf77 Mon Sep 17 00:00:00 2001 From: solidlime Date: Wed, 7 Jan 2026 22:02:43 +0900 Subject: [PATCH] UI: Hide image_data widget for cleaner appearance Added JavaScript to hide the image_data widget: - Set type to 'converted-widget' - Set computeSize to [0, -4] to hide it The widget still functions (auto-filled by file picker) but is no longer visible in the UI for cleaner look. --- web/random_image_picker.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/random_image_picker.js b/web/random_image_picker.js index cf52eaf..65fa01b 100644 --- a/web/random_image_picker.js +++ b/web/random_image_picker.js @@ -11,6 +11,13 @@ app.registerExtension({ const result = onNodeCreated ? onNodeCreated.apply(this, arguments) : undefined; const node = this; + // Hide image_data widget (it's auto-filled by file picker) + const imageDataWidget = node.widgets.find(w => w.name === "image_data"); + if (imageDataWidget) { + imageDataWidget.type = "converted-widget"; + imageDataWidget.computeSize = () => [0, -4]; // Hide it + } + // Add file picker button node.addWidget("button", "📁 Choose File", null, () => { const input = document.createElement("input");