From e229b2523315f9e7bdec2d49955ba521b6c7d2a1 Mon Sep 17 00:00:00 2001 From: bordun Date: Sat, 3 Oct 2020 17:40:42 +0200 Subject: [PATCH] knob: inactive gauge should be dashed too when the property is set --- src/client/widgets/sliders/knob.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/client/widgets/sliders/knob.js b/src/client/widgets/sliders/knob.js index 6bb432dd..7b9e40f1 100644 --- a/src/client/widgets/sliders/knob.js +++ b/src/client/widgets/sliders/knob.js @@ -195,6 +195,8 @@ module.exports = class Knob extends Slider { this.ctx.strokeStyle = this.cssVars.colorFill this.ctx.lineWidth = gaugeWidth - this.gaugePadding * 2 + if (dashed) this.ctx.setLineDash(dashed) + if (this.cssVars.alphaFillOff) { this.ctx.globalAlpha = this.cssVars.alphaFillOff this.ctx.beginPath() @@ -202,8 +204,6 @@ module.exports = class Knob extends Slider { this.ctx.stroke() } - if (dashed) this.ctx.setLineDash(dashed) - if (this.cssVars.alphaFillOn) { this.ctx.globalAlpha = this.cssVars.alphaFillOn this.ctx.beginPath() @@ -256,6 +256,8 @@ module.exports = class Knob extends Slider { this.ctx.strokeStyle = this.cssVars.colorFill this.ctx.lineWidth = this.cssVars.lineWidth + if (dashed) this.ctx.setLineDash(dashed) + if (this.cssVars.alphaFillOff) { this.ctx.globalAlpha = this.cssVars.alphaFillOff this.ctx.beginPath() @@ -263,8 +265,6 @@ module.exports = class Knob extends Slider { this.ctx.stroke() } - if (dashed) this.ctx.setLineDash(dashed) - if (this.cssVars.alphaFillOn) { this.ctx.globalAlpha = this.cssVars.alphaFillOn this.ctx.beginPath() @@ -297,6 +297,8 @@ module.exports = class Knob extends Slider { this.ctx.strokeStyle = this.cssVars.colorFill this.ctx.lineWidth = this.cssVars.lineWidth + if (dashed) this.ctx.setLineDash(dashed) + if (this.cssVars.alphaFillOff) { this.ctx.globalAlpha = this.cssVars.alphaFillOff this.ctx.beginPath() @@ -304,8 +306,6 @@ module.exports = class Knob extends Slider { this.ctx.stroke() } - if (dashed) this.ctx.setLineDash(dashed) - if (this.cssVars.alphaFillOn) { this.ctx.globalAlpha = this.cssVars.alphaFillOn this.ctx.beginPath()