diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c49c95f..4acbe711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - dropdown: allow resubmitting the same value - plot: missing `logScaleX` and `logScaleY` properties - xy/multixy: add `axisLock` property; allow locking one the axis by holding `Shift` while dragging if `axisLock` is not set, bypasses it otherwise. - - fader: add `colorKnob` property + - knob/fader/range: add `colorKnob` property ## 1.25.7 diff --git a/src/client/widgets/sliders/encoder.js b/src/client/widgets/sliders/encoder.js index 73f7b3a3..f63c13a7 100644 --- a/src/client/widgets/sliders/encoder.js +++ b/src/client/widgets/sliders/encoder.js @@ -18,6 +18,7 @@ module.exports = class Encoder extends StaticProperties(Knob, {angle: 360, range pips: null, dashed: null, angle: null, + colorKnob: null }, class_specific: { origin: null, diff --git a/src/client/widgets/sliders/range.js b/src/client/widgets/sliders/range.js index 3502db51..e0493062 100644 --- a/src/client/widgets/sliders/range.js +++ b/src/client/widgets/sliders/range.js @@ -299,7 +299,7 @@ class Range extends Fader { // flat knob this.ctx.globalAlpha = 1 - this.ctx.fillStyle = this.cssVars.colorFill + this.ctx.fillStyle = this.cssVars.colorKnob var compactAdjust = 1 / (height - this.gaugePadding) * (height-this.gaugePadding - knobHeight) this.ctx.beginPath() @@ -331,7 +331,7 @@ class Range extends Fader { this.ctx.fill() this.ctx.globalAlpha = this.cssVars.alphaStroke - this.ctx.strokeStyle = this.cssVars.colorStroke + this.ctx.strokeStyle = this.cssVars.colorKnob this.ctx.lineWidth = PXSCALE this.ctx.beginPath() @@ -341,7 +341,7 @@ class Range extends Fader { } this.ctx.globalAlpha = 1 - this.ctx.fillStyle = this.cssVars.colorWidget + this.ctx.fillStyle = this.cssVars.colorKnob this.ctx.beginPath() this.ctx.rect(m - knobWidth / 6, _d, knobWidth / 3, PXSCALE) @@ -354,7 +354,7 @@ class Range extends Fader { } else { this.ctx.globalAlpha = 1 - this.ctx.fillStyle = this.cssVars.colorFill + this.ctx.fillStyle = this.cssVars.colorKnob this.ctx.beginPath() this.ctx.arc(m, d, knobHeight / 6, 0, 2 * Math.PI) @@ -368,7 +368,7 @@ class Range extends Fader { if (this.cssVars.alphaStroke) { this.ctx.globalAlpha = this.cssVars.alphaStroke - this.ctx.fillStyle = this.cssVars.colorFill + this.ctx.fillStyle = this.cssVars.colorKnob this.ctx.beginPath() this.ctx.arc(m, d, knobHeight / 2, 0, 2 * Math.PI)