diff --git a/Circle.js b/Circle.js index 79f0a9e..eaf39a3 100644 --- a/Circle.js +++ b/Circle.js @@ -34,6 +34,7 @@ export class ProgressCircle extends Component { PropTypes.instanceOf(Animated.Value), ]), rotation: PropTypes.instanceOf(Animated.Value), + rotationStatic: PropTypes.number, showsText: PropTypes.bool, size: PropTypes.number, style: PropTypes.any, @@ -43,6 +44,7 @@ export class ProgressCircle extends Component { unfilledColor: PropTypes.string, endAngle: PropTypes.number, allowFontScaling: PropTypes.bool, + archPercentage: PropTypes.number, }; static defaultProps = { @@ -55,6 +57,7 @@ export class ProgressCircle extends Component { size: 40, thickness: 3, endAngle: 0.9, + archPercentage: 1, allowFontScaling: true, }; @@ -88,6 +91,7 @@ export class ProgressCircle extends Component { indeterminate, progress, rotation, + rotationStatic, showsText, size, style, @@ -96,12 +100,14 @@ export class ProgressCircle extends Component { thickness, unfilledColor, endAngle, + archPercentage, allowFontScaling, ...restProps } = this.props; const border = borderWidth || (indeterminate ? 1 : 0); + const circleAngle = CIRCLE * archPercentage; const radius = size / 2 - border; const offset = { top: border, @@ -114,15 +120,15 @@ 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(progress, circleAngle) + : progress * circleAngle; return ( {unfilledColor && progressValue !== 1 ? (