Tweak visualizer position dimensions

TopazAmp's hard outline made me realize our position was still not correct
This commit is contained in:
Jordan Eldredge 2014-12-15 21:16:05 -08:00
parent 63a803d968
commit 58736a6699
3 changed files with 7 additions and 7 deletions

View file

@ -45,7 +45,7 @@
<div id='second-first-digit'></div>
<div id='second-second-digit'></div>
</div>
<canvas id='visualizer' width='150' height='30'></canvas>
<canvas id='visualizer' width='152' height='32'></canvas>
</div>
<div class='media-info'>
<div id='song-title' class='text'></div>

View file

@ -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);
}
}

View file

@ -288,9 +288,9 @@ body {
#visualizer {
position: absolute;
width: 75px;
height: 15px;
top: 44px;
width: 76px;
height: 16px;
top: 43px;
left: 24px;
}