fader/range: really check if pips are ready to be drawn before drawing them

This commit is contained in:
jean-emmanuel 2025-04-20 10:34:20 +02:00
parent 4c9eecd0af
commit 5abaf7fbb3
3 changed files with 3 additions and 2 deletions

View file

@ -390,7 +390,7 @@ class Fader extends Slider {
this.shouldDrawPips = false
}
if (this.getProp('pips') && !compact) {
if (this.pips) {
this.ctx.globalAlpha = 1
this.ctx.drawImage(this.pips, 0, 0)
if (!compact) this.clearRect = [this.clearRect, [m + knobWidth / 2, 0, 12 * PXSCALE + this.pipsTextSize, height]]

View file

@ -389,7 +389,7 @@ class Range extends Fader {
this.shouldDrawPips = false
}
if (this.getProp('pips')) {
if (this.pips) {
this.ctx.globalAlpha = 1
this.ctx.drawImage(this.pips, 0, 0)
if (!compact) this.clearRect = [this.clearRect, [m + knobWidth / 2, 0, 12 * PXSCALE + this.pipsTextSize, height]]