fix: arc direction - use clockwise for 90° short arc (╭ shape)
This commit is contained in:
@@ -95,7 +95,7 @@ function draw(cur,max){
|
|||||||
|
|
||||||
// background stroke
|
// background stroke
|
||||||
ctx.beginPath();
|
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.lineTo(lx,ey);
|
||||||
ctx.strokeStyle='rgba(255,255,255,.04)';
|
ctx.strokeStyle='rgba(255,255,255,.04)';
|
||||||
ctx.lineWidth=gw;ctx.lineCap='round';ctx.lineJoin='round';
|
ctx.lineWidth=gw;ctx.lineCap='round';ctx.lineJoin='round';
|
||||||
@@ -109,7 +109,7 @@ function draw(cur,max){
|
|||||||
if(pd<=arcLen){
|
if(pd<=arcLen){
|
||||||
ctx.arc(sx,sy,sr,d2r(As),d2r(As+(Ae-As)*(pd/arcLen)),true);
|
ctx.arc(sx,sy,sr,d2r(As),d2r(As+(Ae-As)*(pd/arcLen)),true);
|
||||||
}else{
|
}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.lineTo(ex+(pd-arcLen)/lineLen*(lx-ex),ey);
|
||||||
}
|
}
|
||||||
ctx.strokeStyle=cur>=rl?'rgba(255,50,35,.95)':'rgba(255,255,255,.85)';
|
ctx.strokeStyle=cur>=rl?'rgba(255,50,35,.95)':'rgba(255,255,255,.85)';
|
||||||
|
|||||||
Reference in New Issue
Block a user