fix: arc direction - use clockwise for 90° short arc (╭ shape)

This commit is contained in:
2026-07-25 17:24:42 +08:00
parent 9d34f30daf
commit aedbcced58
+2 -2
View File
@@ -95,7 +95,7 @@ function draw(cur,max){
// background stroke
ctx.beginPath();
ctx.arc(sx,sy,sr,d2r(As),d2r(Ae),true);
ctx.arc(sx,sy,sr,d2r(As),d2r(Ae),false);
ctx.lineTo(lx,ey);
ctx.strokeStyle='rgba(255,255,255,.04)';
ctx.lineWidth=gw;ctx.lineCap='round';ctx.lineJoin='round';
@@ -109,7 +109,7 @@ function draw(cur,max){
if(pd<=arcLen){
ctx.arc(sx,sy,sr,d2r(As),d2r(As+(Ae-As)*(pd/arcLen)),true);
}else{
ctx.arc(sx,sy,sr,d2r(As),d2r(Ae),true);
ctx.arc(sx,sy,sr,d2r(As),d2r(Ae),false);
ctx.lineTo(ex+(pd-arcLen)/lineLen*(lx-ex),ey);
}
ctx.strokeStyle=cur>=rl?'rgba(255,50,35,.95)':'rgba(255,255,255,.85)';