try to solve the input equation

This commit is contained in:
omar92 2023-04-04 19:08:41 +02:00
parent 1718730e80
commit b566f23b94

View File

@ -9994,6 +9994,12 @@ LGraphNode.prototype.executeAction = function(action)
var delta = x < 40 ? -1 : x > widget_width - 40 ? 1 : 0;
if (event.click_time < 200 && delta == 0) {
this.prompt("Value",w.value,function(v) {
try {//solve the equation if possible
v = eval(v);
} catch (error) {
}
this.value = Number(v);
inner_value_change(this, this.value);
}.bind(w),