knob: inactive gauge should be dashed too when the property is set

This commit is contained in:
bordun 2020-10-03 17:40:42 +02:00
parent 65c10f11f1
commit ab9901519a

View file

@ -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()