Closed YanVictor1027 closed 4 months ago
Please Update the following code in SegmentedArc.js Animated.timing(arcAnimatedValue, { toValue: lastFilledSegment.filled, duration: animationDuration, delay: animationDelay, useNativeDriver: false, easing: Easing.out(Easing.ease) }).start(); const listenerId = arcAnimatedValue.addListener(e => { if (e.value === lastFilledSegment.filled) animationRunning.current = false; });
Animated.timing(arcAnimatedValue, { toValue: lastFilledSegment.filled, duration: animationDuration, delay: animationDelay, useNativeDriver: false, easing: Easing.out(Easing.ease) }).start(); const listenerId = arcAnimatedValue.addListener(e => { if (e.value === lastFilledSegment.filled) animationRunning.current = false; });
To
new Animated.timing(arcAnimatedValue, { toValue: lastFilledSegment.filled, duration: animationDuration, delay: animationDelay, useNativeDriver: false, easing: Easing.out(Easing.ease) }).start(({finished}) => {if (finished) animationRunning.current = false});
As comparing two value might fail due to precision issue. https://reactnative.dev/docs/animated#start
Hi @YanVictor1027, have you experienced that issue? So far we have not seen it happening on iOS.
Closing this issue due to inactivity, please create a new one if you experience this problem again. Thanks!
Please Update the following code in SegmentedArc.js
Animated.timing(arcAnimatedValue, { toValue: lastFilledSegment.filled, duration: animationDuration, delay: animationDelay, useNativeDriver: false, easing: Easing.out(Easing.ease) }).start(); const listenerId = arcAnimatedValue.addListener(e => { if (e.value === lastFilledSegment.filled) animationRunning.current = false; });
To
new Animated.timing(arcAnimatedValue, { toValue: lastFilledSegment.filled, duration: animationDuration, delay: animationDelay, useNativeDriver: false, easing: Easing.out(Easing.ease) }).start(({finished}) => {if (finished) animationRunning.current = false});
As comparing two value might fail due to precision issue. https://reactnative.dev/docs/animated#start