progressbar, centered percentage

main
Codinget 4 years ago
parent b6c4a1b6d0
commit 71c6ee887a
  1. 2
      src/js/progress.js

@ -34,7 +34,7 @@ class ProgressBar {
ctx.fillRect(0, 0, canvas.width*this.completeCount/this.taskCount, canvas.height);
ctx.fillStyle=textColor;
ctx.textAlign='center';
ctx.textBaseline='center';
ctx.textBaseline='middle';
ctx.font=`${canvas.height/2}px 'Fira Code'`;
ctx.fillText(this.percent+'%', canvas.width/2, canvas.height/2);
}

Loading…
Cancel
Save