Merge pull request #236 from rajpootathar/master

adding dashes to fill as well
This commit is contained in:
Markus Lindqvist 2020-02-16 11:01:54 +02:00 committed by GitHub
commit 5eb6b679be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,14 +45,15 @@ export default class CircularProgress extends React.PureComponent {
const sizeWithPadding = size / 2 + padding / 2;
const radius = size / 2 - maxWidthCircle / 2 - padding / 2;
const backgroundPath = this.circlePath(
const currentFillAngle = (arcSweepAngle * this.clampFill(fill)) / 100;
const backgroundPath = this.circlePath(
sizeWithPadding,
sizeWithPadding,
radius,
0,
currentFillAngle,
arcSweepAngle
);
const currentFillAngle = (arcSweepAngle * this.clampFill(fill)) / 100;
const circlePath = this.circlePath(
sizeWithPadding,
sizeWithPadding,
@ -114,6 +115,7 @@ export default class CircularProgress extends React.PureComponent {
stroke={tintColor}
strokeWidth={width}
strokeLinecap={lineCap}
strokeDasharray={strokeDasharray}
fill="transparent"
/>
)}