From 58736a6699a3d585d86621db54593ad2cb6a42a1 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Mon, 15 Dec 2014 21:16:05 -0800 Subject: [PATCH] Tweak visualizer position dimensions TopazAmp's hard outline made me realize our position was still not correct --- index.html | 2 +- visualizer.js | 6 +++--- winamp.css | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index adb18fd4..bc35ec80 100755 --- a/index.html +++ b/index.html @@ -45,7 +45,7 @@
- +
diff --git a/visualizer.js b/visualizer.js index 55a42c2b..1049a8af 100644 --- a/visualizer.js +++ b/visualizer.js @@ -45,7 +45,7 @@ Visualizer = { this.bgCanvasCtx.fillRect(0,0,this.width, this.height); this.bgCanvasCtx.fillStyle = this.colors[1]; for(x = 0; x < this.width; x += 4) { - for(y = 0; y < this.height; y += 4) { + for(y = 2; y < this.height; y += 4) { this.bgCanvasCtx.fillRect(x,y,2,2); } } @@ -146,7 +146,7 @@ Visualizer = { var printBar = function(x, height) { height = Math.round(height) * 2; if(height > 0) { - y = 30 - height; + y = 32 - height; // Draw the gray peak line this.canvasCtx.drawImage(this.barCanvas, 0, 0, 6, 2, x, y - 2, 6, 2); // Draw the gradient @@ -156,7 +156,7 @@ Visualizer = { this.analyser.getByteFrequencyData(this.dataArray); for(j = 0; j < this.bufferLength; j++) { - height = this.dataArray[j] * (15/256); + height = this.dataArray[j] * (14/256); printBar(j*8, height); } } diff --git a/winamp.css b/winamp.css index e0409edc..18c3646c 100755 --- a/winamp.css +++ b/winamp.css @@ -288,9 +288,9 @@ body { #visualizer { position: absolute; - width: 75px; - height: 15px; - top: 44px; + width: 76px; + height: 16px; + top: 43px; left: 24px; }