Zoom now works.

This commit is contained in:
Henry Wang 2017-02-24 22:59:05 -06:00
parent 7e6f2505b4
commit 777a76e94e
2 changed files with 4 additions and 2 deletions

View File

@ -462,7 +462,8 @@ $(function() {
barOffset = ctx.measureText(user.name).width + 10; barOffset = ctx.measureText(user.name).width + 10;
ctx.fillText(user.name, 5, CELL_WIDTH - 5); ctx.fillText(user.name, 5, CELL_WIDTH - 5);
zoom = .0014 / lagPortion; zoom = 1 / (lagPortion + 1); //Zoom goes from 1 to .5, decreasing as portion goes up. TODO: maybe can modify this?
console.log(zoom);
//Draw filled bar. //Draw filled bar.
ctx.fillStyle = "rgba(180, 180, 180, .3)"; ctx.fillStyle = "rgba(180, 180, 180, .3)";

View File

@ -560,7 +560,8 @@ $(function() {
barOffset = ctx.measureText(user.name).width + 10; barOffset = ctx.measureText(user.name).width + 10;
ctx.fillText(user.name, 5, CELL_WIDTH - 5); ctx.fillText(user.name, 5, CELL_WIDTH - 5);
zoom = .0014 / lagPortion; zoom = 1 / (lagPortion + 1); //Zoom goes from 1 to .5, decreasing as portion goes up. TODO: maybe can modify this?
console.log(zoom);
//Draw filled bar. //Draw filled bar.
ctx.fillStyle = "rgba(180, 180, 180, .3)"; ctx.fillStyle = "rgba(180, 180, 180, .3)";