diff --git a/Circle.js b/Circle.js index 79f0a9e..3888fd4 100644 --- a/Circle.js +++ b/Circle.js @@ -42,6 +42,7 @@ export class ProgressCircle extends Component { thickness: PropTypes.number, unfilledColor: PropTypes.string, endAngle: PropTypes.number, + unfilledEndAngle: PropTypes.number, allowFontScaling: PropTypes.bool, }; @@ -55,6 +56,7 @@ export class ProgressCircle extends Component { size: 40, thickness: 3, endAngle: 0.9, + unfilledEndAngle: 0.9, allowFontScaling: true, }; @@ -96,6 +98,7 @@ export class ProgressCircle extends Component { thickness, unfilledColor, endAngle, + unfilledEndAngle, allowFontScaling, ...restProps } = this.props; @@ -114,8 +117,11 @@ export class ProgressCircle extends Component { const Shape = animated ? AnimatedArc : Arc; const progressValue = animated ? this.progressValue : progress; const angle = animated - ? Animated.multiply(progress, CIRCLE) - : progress * CIRCLE; + ? Animated.multiply(Animated.multiply(progress, CIRCLE), unfilledEndAngle) + : progress * CIRCLE * unfilledEndAngle; + const endUnfilledAngleValue = animated + ? Animated.multiply(unfilledEndAngle, CIRCLE) + : unfilledEndAngle * CIRCLE; return ( @@ -137,13 +143,13 @@ export class ProgressCircle extends Component { : undefined } > - {unfilledColor && progressValue !== 1 ? ( + {unfilledColor ? (