mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
try solve the numbers equations
This commit is contained in:
@@ -9985,6 +9985,10 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
var delta = x < 40 ? -1 : x > widget_width - 40 ? 1 : 0;
|
var delta = x < 40 ? -1 : x > widget_width - 40 ? 1 : 0;
|
||||||
if (event.click_time < 200 && delta == 0) {
|
if (event.click_time < 200 && delta == 0) {
|
||||||
this.prompt("Value",w.value,function(v) {
|
this.prompt("Value",w.value,function(v) {
|
||||||
|
try {//solve the equation if possible
|
||||||
|
v = eval(v);
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
this.value = Number(v);
|
this.value = Number(v);
|
||||||
inner_value_change(this, this.value);
|
inner_value_change(this, this.value);
|
||||||
}.bind(w),
|
}.bind(w),
|
||||||
|
|||||||
Reference in New Issue
Block a user