Add function performLinearAnimation

This commit is contained in:
Marc Shilling 2016-04-12 17:00:56 -04:00
parent 7368e8ba7e
commit 2c04c79d51

View File

@ -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,