From 487571296529bc6c53401bf997e345cd8d1306bf Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 12 Feb 2018 17:03:49 +0100 Subject: [PATCH] knob: safe gradient color --- src/browser/js/app/widgets/sliders/knob.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/browser/js/app/widgets/sliders/knob.js b/src/browser/js/app/widgets/sliders/knob.js index d14edf50..6cfd3d5a 100644 --- a/src/browser/js/app/widgets/sliders/knob.js +++ b/src/browser/js/app/widgets/sliders/knob.js @@ -1,4 +1,4 @@ -var {clip, mapToScale} = require('../utils'), +rep var {clip, mapToScale} = require('../utils'), Slider = require('./slider') module.exports = class Knob extends Slider { @@ -239,9 +239,9 @@ module.exports = class Knob extends Slider { this.ctx.strokeStyle = this.colors.light this.ctx.stroke() - var g = this.ctx.createLinearGradient(this.width / 2, this.height / 2 - knobRadius / 2,this.width / 2, this.height / 2 + knobRadius / 2); - g.addColorStop(0.5, 'transparent'); - g.addColorStop(0, this.colors.light); + var g = this.ctx.createLinearGradient(this.width / 2, this.height / 2 - knobRadius / 2,this.width / 2, this.height / 2 + knobRadius / 2) + g.addColorStop(0.5, 'transparent') + g.addColorStop(0, this.colors.light || 'transparent') this.ctx.strokeStyle = g this.ctx.stroke()