Merge pull request #410 from Guillaume-Fgt/slider_precision

replacing slider precision harcoded value
This commit is contained in:
Javi Agenjo
2023-07-31 12:01:10 +02:00
committed by GitHub

View File

@@ -9837,7 +9837,11 @@ LGraphNode.prototype.executeAction = function(action)
ctx.textAlign = "center";
ctx.fillStyle = text_color;
ctx.fillText(
w.label || w.name + " " + Number(w.value).toFixed(3),
w.label || w.name + " " + Number(w.value).toFixed(
w.options.precision != null
? w.options.precision
: 3
),
widget_width * 0.5,
y + H * 0.7
);