Revert "fader: gradient prop"

This reverts commit b39db20bf4.
This commit is contained in:
bordun 2019-10-24 11:56:55 +02:00
parent b39db20bf4
commit c886f19ddd
2 changed files with 2 additions and 11 deletions

View file

@ -4,9 +4,7 @@
- bug fixes
- modal: `popupLabel` update issues
- modal: `popupTop` not correctly interpreting percents
- widgets
- fader: added `gradient` property
- modal: `popupTop` not correctly interpreting percents
## 0.48.0

View file

@ -21,13 +21,6 @@ module.exports = class Fader extends Slider {
'- the meter\'s `address` will be the same as the widget\'s with `/meter` appended to it'
]},
compact: {type: 'boolean', value: false, help: 'Set to `true` to display a compact alternative for the widget. If `input` is `true`, the input can be focused with a right-click (mouse only). Disables `pips` when enabled.'},
gradient: {type: 'array|object', value: [], help: [
'When set, the fader\'s gauge will be filled with a linear color gradient',
'- each item must be a CSS color string.',
'- as an `object`: each key must be a number between 0 and 1',
'- each item must be a CSS color string.',
'Examples: `[\'blue\', \'red\']`, {\'0\': \'blue\', \'0.9\': \'blue\', \'1\': \'red\'} '
]},
dashed: {type: 'boolean', value: false, help: 'Set to `true` to display a dashed gauge'},
snap: {type: 'boolean', value: false, help: 'By default, dragging the widget will modify it\'s value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position'},
spring: {type: 'boolean', value: false, help: 'When set to `true`, the widget will go back to its `default` value when released'},
@ -308,7 +301,7 @@ module.exports = class Fader extends Slider {
this.ctx.beginPath()
this.ctx.globalAlpha = 0.7
this.ctx.strokeStyle = this.colors.gradient || this.colors.gauge
this.ctx.strokeStyle = this.colors.gauge
this.ctx.moveTo(m, o)
this.ctx.lineTo(m, d)
if (dashed) this.ctx.setLineDash([PXSCALE, PXSCALE])