fader: gradient breakpoints not positioned correctly

This commit is contained in:
jean-emmanuel 2023-02-20 17:35:17 +01:00
parent bcb8f45505
commit 2b207e5762
2 changed files with 2 additions and 1 deletions

View file

@ -4,6 +4,7 @@
- bug fixes
- linkId not working between two encoder widgets
- fader: `gradient` breakpoints not positioned correctly
- scripting
- expose file browser (from the file widget) as a scripting function

View file

@ -137,7 +137,7 @@ class Fader extends Slider {
(typeof colors === 'object' && Object.keys(colors).length > 1)
) {
var grad = this.ctx.createLinearGradient(0, this.getProp('horizontal') ? 0 : this.height, 0, this.getProp('horizontal') ? this.width : 0)
var grad = this.ctx.createLinearGradient(this.gaugePadding, this.getProp('horizontal') ? this.gaugePadding : this.height - this.gaugePadding, this.gaugePadding, this.getProp('horizontal') ? this.width - this.gaugePadding : this.gaugePadding)
try {
if (Array.isArray(colors)) {