diff --git a/web/comfyui/json_display_widget.js b/web/comfyui/json_display_widget.js index 52d03f54..22043c07 100644 --- a/web/comfyui/json_display_widget.js +++ b/web/comfyui/json_display_widget.js @@ -5,9 +5,6 @@ export function addJsonDisplayWidget(node, name, opts) { // Set initial height const defaultHeight = 200; - container.style.setProperty('--comfy-widget-min-height', `${defaultHeight}px`); - container.style.setProperty('--comfy-widget-max-height', `${defaultHeight * 2}px`); - container.style.setProperty('--comfy-widget-height', `${defaultHeight}px`); Object.assign(container.style, { display: "block", @@ -113,16 +110,6 @@ export function addJsonDisplayWidget(node, name, opts) { widgetValue = v; displayJson(widgetValue, widget); }, - getMinHeight: function() { - return parseInt(container.style.getPropertyValue('--comfy-widget-min-height')) || defaultHeight; - }, - getMaxHeight: function() { - return parseInt(container.style.getPropertyValue('--comfy-widget-max-height')) || defaultHeight * 2; - }, - getHeight: function() { - // Return actual container height to reduce the gap - return parseInt(container.style.getPropertyValue('--comfy-widget-height')) || defaultHeight; - }, hideOnZoom: true }); diff --git a/web/comfyui/lora_loader.js b/web/comfyui/lora_loader.js index 958f4878..73a6fb37 100644 --- a/web/comfyui/lora_loader.js +++ b/web/comfyui/lora_loader.js @@ -156,6 +156,7 @@ app.registerExtension({ // Update input widget callback const inputWidget = this.widgets[0]; + inputWidget.options.getMaxHeight = () => 100; this.inputWidget = inputWidget; inputWidget.callback = (value) => { if (isUpdating) return; diff --git a/web/comfyui/lora_stacker.js b/web/comfyui/lora_stacker.js index 1309ec66..45e10bee 100644 --- a/web/comfyui/lora_stacker.js +++ b/web/comfyui/lora_stacker.js @@ -77,6 +77,7 @@ app.registerExtension({ // Update input widget callback const inputWidget = this.widgets[0]; + inputWidget.options.getMaxHeight = () => 100; this.inputWidget = inputWidget; inputWidget.callback = (value) => { if (isUpdating) return; diff --git a/web/comfyui/loras_widget.js b/web/comfyui/loras_widget.js index 8f317c34..41ca9ea7 100644 --- a/web/comfyui/loras_widget.js +++ b/web/comfyui/loras_widget.js @@ -19,9 +19,6 @@ export function addLorasWidget(node, name, opts, callback) { // Set initial height using CSS variables approach const defaultHeight = 200; - container.style.setProperty('--comfy-widget-min-height', `${defaultHeight}px`); - container.style.setProperty('--comfy-widget-max-height', `${defaultHeight * 2}px`); - container.style.setProperty('--comfy-widget-height', `${defaultHeight}px`); Object.assign(container.style, { display: "flex", @@ -712,23 +709,8 @@ export function addLorasWidget(node, name, opts, callback) { widgetValue = updatedValue; renderLoras(widgetValue, widget); }, - getMinHeight: function() { - return parseInt(container.style.getPropertyValue('--comfy-widget-min-height')) || defaultHeight; - }, - getMaxHeight: function() { - return parseInt(container.style.getPropertyValue('--comfy-widget-max-height')) || defaultHeight * 2; - }, - getHeight: function() { - return parseInt(container.style.getPropertyValue('--comfy-widget-height')) || defaultHeight; - }, hideOnZoom: true, - selectOn: ['click', 'focus'], - afterResize: function(node) { - // Re-render after node resize - if (this.value && this.value.length > 0) { - renderLoras(this.value, this); - } - } + selectOn: ['click', 'focus'] }); widget.value = defaultValue; diff --git a/web/comfyui/tags_widget.js b/web/comfyui/tags_widget.js index e71a5627..b87f1e6b 100644 --- a/web/comfyui/tags_widget.js +++ b/web/comfyui/tags_widget.js @@ -5,9 +5,6 @@ export function addTagsWidget(node, name, opts, callback) { // Set initial height const defaultHeight = 150; - container.style.setProperty('--comfy-widget-min-height', `${defaultHeight}px`); - container.style.setProperty('--comfy-widget-max-height', `${defaultHeight * 2}px`); - container.style.setProperty('--comfy-widget-height', `${defaultHeight}px`); Object.assign(container.style, { display: "flex", @@ -199,23 +196,8 @@ export function addTagsWidget(node, name, opts, callback) { widgetValue = v; renderTags(widgetValue, widget); }, - getMinHeight: function() { - return parseInt(container.style.getPropertyValue('--comfy-widget-min-height')) || defaultHeight; - }, - getMaxHeight: function() { - return parseInt(container.style.getPropertyValue('--comfy-widget-max-height')) || defaultHeight * 2; - }, - getHeight: function() { - return parseInt(container.style.getPropertyValue('--comfy-widget-height')) || defaultHeight; - }, hideOnZoom: true, - selectOn: ['click', 'focus'], - afterResize: function(node) { - // Re-render tags after node resize - if (this.value && this.value.length > 0) { - renderTags(this.value, this); - } - } + selectOn: ['click', 'focus'] }); // Set initial value diff --git a/web/comfyui/wanvideo_lora_select.js b/web/comfyui/wanvideo_lora_select.js index 9712d9cf..f2173556 100644 --- a/web/comfyui/wanvideo_lora_select.js +++ b/web/comfyui/wanvideo_lora_select.js @@ -78,6 +78,7 @@ app.registerExtension({ // Update input widget callback const inputWidget = this.widgets[1]; + inputWidget.options.getMaxHeight = () => 100; this.inputWidget = inputWidget; inputWidget.callback = (value) => { if (isUpdating) return;