diff --git a/CHANGELOG.md b/CHANGELOG.md index 884da42c..12c92ab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## next + +- bug fixes + - fader: pips drawing issue causing small a position offset or errors with some browsers + ## 1.27.3 - bug fixes diff --git a/src/client/widgets/sliders/fader.js b/src/client/widgets/sliders/fader.js index 31a1caca..98b50bb9 100644 --- a/src/client/widgets/sliders/fader.js +++ b/src/client/widgets/sliders/fader.js @@ -66,6 +66,7 @@ class Fader extends Slider { this.container.classList.toggle('horizontal', this.getProp('horizontal')) this.gaugeGradient = null + this.shouldDrawPips = false var dashed = this.getProp('dashed') this.dashed = dashed ? Array.isArray(dashed) ? dashed.map(x=>parseFloat(x)) : [1, 1] : false @@ -172,7 +173,7 @@ class Fader extends Slider { super.cacheCanvasStyle(style) - if (this.getProp('pips') && this.getProp('design') !== 'compact') this.drawPips() + if (this.getProp('pips') && this.getProp('design') !== 'compact') this.shouldDrawPips = true } @@ -324,6 +325,11 @@ class Fader extends Slider { } + if (this.shouldDrawPips) { + this.drawPips() + this.shouldDrawPips = false + } + if (this.getProp('pips') && !compact) { this.ctx.globalAlpha = 1 this.ctx.drawImage(this.pips, 0, 0)