From 70b3e7156851f682da25e222ab6a84f11251ea74 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 22 Nov 2016 18:51:29 +0100 Subject: [PATCH] knob: swaggify compact gauge (link alpha & distance to origin) --- src/browser/js/app/widgets/sliders/knob.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/browser/js/app/widgets/sliders/knob.js b/src/browser/js/app/widgets/sliders/knob.js index c80fbf8c..7f95edc5 100644 --- a/src/browser/js/app/widgets/sliders/knob.js +++ b/src/browser/js/app/widgets/sliders/knob.js @@ -162,7 +162,7 @@ Knob.prototype.draw = function(){ this.ctx.arc(this.width / 2, this.height / 2, this.minDimension / 2 - (this.gaugeWidth + this.margin) * PXSCALE, min, max) this.ctx.stroke() - this.ctx.globalAlpha = 0.3 + this.ctx.globalAlpha = 0.2 + 0.2 * Math.abs(d-o) / (d