fader: glitch with large lineWidth values in default design mode

This commit is contained in:
jean-emmanuel 2025-01-21 18:04:01 +01:00
parent 85c393d184
commit 5c65d4d594
2 changed files with 7 additions and 1 deletions

View file

@ -298,7 +298,8 @@ class Fader extends Slider {
this.ctx.rect(m - knobWidth / 6, d, knobWidth / 3, PXSCALE)
this.ctx.fill()
this.clearRect = [m - knobWidth / 2 - PXSCALE, this.gaugePadding - knobHeight / 2 - PXSCALE, knobWidth + 2 * PXSCALE, height - 2 * this.gaugePadding + knobHeight + 2 * PXSCALE]
var clearWidth = Math.max(knobWidth, this.cssVars.lineWidth)
this.clearRect = [m - clearWidth / 2 - PXSCALE, this.gaugePadding - knobHeight / 2 - PXSCALE, clearWidth + 2 * PXSCALE, height - 2 * this.gaugePadding + knobHeight + 2 * PXSCALE]
} else {