diff --git a/web/extensions/core/widgetInputs.js b/web/extensions/core/widgetInputs.js index 4113dc9f9..c89f86b50 100644 --- a/web/extensions/core/widgetInputs.js +++ b/web/extensions/core/widgetInputs.js @@ -260,6 +260,8 @@ app.registerExtension({ onPropertyChanged(property, value) { if (property === "valuesType") { const isList = value === "list" + if (this.mainWidget) + this.mainWidget.disabled = isList if (this.listWidget) this.listWidget.disabled = !isList diff --git a/web/scripts/app.js b/web/scripts/app.js index e135df1cc..c1ecb7d82 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -450,8 +450,6 @@ export class ComfyApp { this.pointerDown = null; } - let w = this.imgs[0].naturalWidth; - let h = this.imgs[0].naturalHeight; let imageIndex = this.imageIndex; const numImages = this.imgs.length; if (numImages === 1 && !imageIndex) { @@ -465,6 +463,8 @@ export class ComfyApp { dh -= shiftY; if (imageIndex == null) { + let w = this.imgs[0].naturalWidth; + let h = this.imgs[0].naturalHeight; let best = 0; let cellWidth; let cellHeight;