Skip to content

Commit 5eb6b67

Browse files
author
Markus Lindqvist
authored
Merge pull request #236 from rajpootathar/master
adding dashes to fill as well
2 parents 1242f68 + ff1b84c commit 5eb6b67

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/CircularProgress.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ export default class CircularProgress extends React.PureComponent {
4545
const sizeWithPadding = size / 2 + padding / 2;
4646
const radius = size / 2 - maxWidthCircle / 2 - padding / 2;
4747

48-
const backgroundPath = this.circlePath(
48+
49+
const currentFillAngle = (arcSweepAngle * this.clampFill(fill)) / 100;
50+
const backgroundPath = this.circlePath(
4951
sizeWithPadding,
5052
sizeWithPadding,
5153
radius,
52-
0,
54+
currentFillAngle,
5355
arcSweepAngle
5456
);
55-
const currentFillAngle = (arcSweepAngle * this.clampFill(fill)) / 100;
5657
const circlePath = this.circlePath(
5758
sizeWithPadding,
5859
sizeWithPadding,
@@ -114,6 +115,7 @@ export default class CircularProgress extends React.PureComponent {
114115
stroke={tintColor}
115116
strokeWidth={width}
116117
strokeLinecap={lineCap}
118+
strokeDasharray={strokeDasharray}
117119
fill="transparent"
118120
/>
119121
)}

0 commit comments

Comments
 (0)