From 7f0c3b02fb6f566f1cb7758799845a68b2097936 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sun, 15 Dec 2024 12:47:53 -0800 Subject: [PATCH] Fix slider value display when widget.label is present (#381) --- src/LGraphCanvas.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index 74a400ebc4..50534c5965 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -6240,8 +6240,7 @@ export class LGraphCanvas { ctx.textAlign = "center" ctx.fillStyle = text_color ctx.fillText( - w.label || - w.name + + (w.label || w.name) + " " + Number(w.value).toFixed( w.options.precision != null ? w.options.precision : 3,