Skip to content

Commit

Permalink
fix(arc.js): do not draw when startAngle equal endAngle
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Apr 5, 2019
1 parent ddea798 commit a6b2aad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/graphic/shape/arc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class Arc extends Shape {
const { x, y, r, startAngle, endAngle, clockwise } = attrs;

context.beginPath();
context.arc(x, y, r, startAngle, endAngle, clockwise);
if (startAngle !== endAngle) {
context.arc(x, y, r, startAngle, endAngle, clockwise);
}
}

calculateBox() {
Expand Down

0 comments on commit a6b2aad

Please sign in to comment.