mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 23:50:08 +00:00
Merge pull request #228 from RobTheFiveNine/bugfix/property-dialog-context-menu
Fix property dialog box incorrectly showing context menus for non combo widget types
This commit is contained in:
@@ -10328,7 +10328,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
innerChange(propname, v);
|
||||
});
|
||||
}
|
||||
else if (type == "enum" || type == "combo")
|
||||
else if (type == "enum" || type == "combo") {
|
||||
var str_value = LGraphCanvas.getPropertyPrintableValue( value, options.values );
|
||||
value_element.innerText = str_value;
|
||||
|
||||
@@ -10350,6 +10350,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
root.content.appendChild(elem);
|
||||
|
||||
|
||||
18
build/litegraph.min.js
vendored
18
build/litegraph.min.js
vendored
@@ -4536,19 +4536,17 @@ $jscomp.polyfill("Array.prototype.findIndex", function(x) {
|
||||
});
|
||||
} else {
|
||||
if ("enum" == a || "combo" == a) {
|
||||
q = l.getPropertyPrintableValue(g, h.values);
|
||||
q = l.getPropertyPrintableValue(g, h.values), t.innerText = q, t.addEventListener("click", function(a) {
|
||||
var b = this.parentNode.dataset.property, c = this;
|
||||
new e.ContextMenu(h.values || [], {event:a, className:"dark", callback:function(a, d, e) {
|
||||
c.innerText = a;
|
||||
k(b, a);
|
||||
return !1;
|
||||
}}, d);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
t.innerText = q;
|
||||
t.addEventListener("click", function(a) {
|
||||
var b = this.parentNode.dataset.property, c = this;
|
||||
new e.ContextMenu(h.values || [], {event:a, className:"dark", callback:function(a, d, e) {
|
||||
c.innerText = a;
|
||||
k(b, a);
|
||||
return !1;
|
||||
}}, d);
|
||||
});
|
||||
c.content.appendChild(f);
|
||||
return f;
|
||||
};
|
||||
|
||||
@@ -10328,7 +10328,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
innerChange(propname, v);
|
||||
});
|
||||
}
|
||||
else if (type == "enum" || type == "combo")
|
||||
else if (type == "enum" || type == "combo") {
|
||||
var str_value = LGraphCanvas.getPropertyPrintableValue( value, options.values );
|
||||
value_element.innerText = str_value;
|
||||
|
||||
@@ -10350,6 +10350,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
root.content.appendChild(elem);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user