replacing slider precision harcoded value

This commit is contained in:
Guillaume Faguet
2023-07-31 09:43:58 +02:00
parent 551643839a
commit 994114160b

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 !== undefined
? w.options.precision
: 3
),
widget_width * 0.5,
y + H * 0.7
);