From fc5cad9d7b4c74763b3617afa14c9c2adeb4b62a Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 22 Nov 2016 17:50:25 +0100 Subject: [PATCH] fader: compact ultra swag (slight aplha variation with distance to origin increasing) --- src/browser/js/app/widgets/sliders/fader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/js/app/widgets/sliders/fader.js b/src/browser/js/app/widgets/sliders/fader.js index 09b394a1..671d7ddc 100644 --- a/src/browser/js/app/widgets/sliders/fader.js +++ b/src/browser/js/app/widgets/sliders/fader.js @@ -165,7 +165,7 @@ Fader.prototype.draw = function(){ if (this.widgetData.horizontal) { if (this.widgetData.compact) { - this.ctx.globalAlpha = 0.3 + this.ctx.globalAlpha = 0.2 + 0.2 * Math.abs(d-o)/this.width this.ctx.strokeStyle = this.colors.gauge this.ctx.beginPath() this.ctx.moveTo(d, this.height / 2) @@ -229,7 +229,7 @@ Fader.prototype.draw = function(){ if (this.widgetData.compact) { - this.ctx.globalAlpha = 0.3 + this.ctx.globalAlpha = 0.2 + 0.2 * Math.abs(d-o)/this.height this.ctx.strokeStyle = this.colors.gauge this.ctx.beginPath() this.ctx.moveTo(this.width / 2, d)