From ffa2a24cb1fa3a6f120356ada16c0d0cf1308da7 Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Wed, 27 Nov 2024 05:05:24 +1100 Subject: [PATCH] Fix slider regression caused by CanvasPointer (#347) --- src/LGraphCanvas.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index ca1cbae35..b5d57a344 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -2518,6 +2518,7 @@ export class LGraphCanvas { if (widget.options.read_only) break pointer.onDrag = (eMove) => { + const x = eMove.canvasX - node.pos[0] const slideFactor = clamp((x - 15) / (width - 30), 0, 1) widget.value = widget.options.min + (widget.options.max - widget.options.min) * slideFactor if (oldValue != widget.value) {