react-native-text-ticker
Advanced tools
Comparing version 0.17.0 to 0.18.0
34
index.js
@@ -113,19 +113,23 @@ import React, { PureComponent } from 'react' | ||
this.setTimeout(() => { | ||
Animated.timing(this.animatedValue, { | ||
toValue: -this.textWidth - repeatSpacer, | ||
duration: duration || children.length * 150, | ||
easing: easing, | ||
isInteraction: isInteraction, | ||
useNativeDriver: useNativeDriver | ||
}).start(({ finished }) => { | ||
if (finished) { | ||
if (onMarqueeComplete) { | ||
onMarqueeComplete() | ||
const scrollToValue = -this.textWidth - repeatSpacer | ||
if(!isNaN(scrollToValue)) { | ||
Animated.timing(this.animatedValue, { | ||
toValue: scrollToValue, | ||
duration: duration || children.length * 150, | ||
easing: easing, | ||
isInteraction: isInteraction, | ||
useNativeDriver: useNativeDriver | ||
}).start(({ finished }) => { | ||
if (finished) { | ||
if (onMarqueeComplete) { | ||
onMarqueeComplete() | ||
} | ||
if (loop) { | ||
this.animatedValue.setValue(0) | ||
this.animateScroll() | ||
} | ||
} | ||
if (loop) { | ||
this.animatedValue.setValue(0) | ||
this.animateScroll() | ||
} | ||
})} else { | ||
this.start() | ||
} | ||
}) | ||
}, marqueeDelay) | ||
@@ -132,0 +136,0 @@ } |
{ | ||
"name": "react-native-text-ticker", | ||
"version": "0.17.0", | ||
"version": "0.18.0", | ||
"description": "React Native Text Ticker/Marquee Component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15198
298