(iteration = 1)
| 70 | } |
| 71 | |
| 72 | animate(iteration = 1) { |
| 73 | Animated.sequence([ |
| 74 | Animated.timing(this.state.startAngle, { |
| 75 | toValue: -MAX_ARC_ANGLE * iteration - MIN_ARC_ANGLE, |
| 76 | duration: this.props.duration || 1000, |
| 77 | isInteraction: false, |
| 78 | easing: Easing.inOut(Easing.quad), |
| 79 | useNativeDriver: this.props.useNativeDriver, |
| 80 | }), |
| 81 | Animated.timing(this.state.endAngle, { |
| 82 | toValue: -MAX_ARC_ANGLE * iteration, |
| 83 | duration: this.props.duration || 1000, |
| 84 | isInteraction: false, |
| 85 | easing: Easing.inOut(Easing.quad), |
| 86 | useNativeDriver: this.props.useNativeDriver, |
| 87 | }), |
| 88 | ]).start(endState => { |
| 89 | if (endState.finished) { |
| 90 | if (Array.isArray(this.props.color)) { |
| 91 | this.setState({ |
| 92 | colorIndex: iteration % this.props.color.length, |
| 93 | }); |
| 94 | } |
| 95 | this.animate(iteration + 1); |
| 96 | } |
| 97 | }); |
| 98 | } |
| 99 | |
| 100 | spin() { |
| 101 | Animated.timing(this.state.rotation, { |
no outgoing calls
no test coverage detected