From 2c04c79d517356089cea5b8d699755f0eebe0501 Mon Sep 17 00:00:00 2001 From: Marc Shilling Date: Tue, 12 Apr 2016 17:00:56 -0400 Subject: [PATCH] Add function performLinearAnimation --- src/AnimatedCircularProgress.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/AnimatedCircularProgress.js b/src/AnimatedCircularProgress.js index 8e6238c..0a7333f 100644 --- a/src/AnimatedCircularProgress.js +++ b/src/AnimatedCircularProgress.js @@ -33,6 +33,13 @@ export default class AnimatedCircularProgress extends React.Component { } ).start(); } + + performLinearAnimation(toValue, duration) { + Animated.timing(this.state.chartFillAnimation, { + toValue: toValue, + duration: duration + }).start(); + } render() { const { fill, prefill, ...other } = this.props; @@ -49,7 +56,7 @@ export default class AnimatedCircularProgress extends React.Component { AnimatedCircularProgress.propTypes = { style: View.propTypes.style, size: PropTypes.number.isRequired, - fill: PropTypes.number.isRequired, + fill: PropTypes.number, prefill: PropTypes.number, width: PropTypes.number.isRequired, tintColor: PropTypes.string,