Skip to content

Commit

Permalink
Fix slider regression caused by CanvasPointer
Browse files Browse the repository at this point in the history
  • Loading branch information
webfiltered committed Nov 26, 2024
1 parent c61b08a commit c6de900
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/LGraphCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c6de900

Please sign in to comment.