progressbar, centered percentage
This commit is contained in:
parent
c850d9ffa9
commit
7d97132aa1
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue