react-native-indicator
Advanced tools
Comparing version 0.5.6 to 0.5.7
@@ -39,3 +39,2 @@ /** | ||
this._animation = this._animation.bind(this); | ||
this.timers = []; | ||
} | ||
@@ -57,8 +56,3 @@ | ||
componentDidMount() { | ||
this.state.heights.forEach((item, i) => { | ||
const id = setTimeout(() => { | ||
this._animation(i); | ||
}, i * (1200 / this.props.barNumber)); | ||
this.timers.push(id); | ||
}); | ||
this._animation(); | ||
} | ||
@@ -68,14 +62,18 @@ | ||
this.unmounted = true; | ||
this.timers.forEach((id) => { | ||
clearTimeout(id); | ||
}); | ||
} | ||
_animation(i) { | ||
Animated.sequence([ | ||
Animated.timing(this.state.heights[i], {toValue: 5, duration: 600}), | ||
Animated.timing(this.state.heights[i], {toValue: this.props.barHeight, duration: 600}), | ||
]).start(() => { | ||
_animation() { | ||
function seq(self, i) { | ||
return Animated.sequence([ | ||
Animated.timing(self.state.heights[i], {toValue: 5, duration: 500, delay: i*200}), | ||
Animated.timing(self.state.heights[i], {toValue: self.props.barHeight, duration: 500}) | ||
]) | ||
} | ||
let anim = []; | ||
for(let i=0; i<this.props.barNumber; i++) | ||
anim.push(seq(this,i)); | ||
Animated.parallel(anim).start(() => { | ||
if (!this.unmounted) { | ||
this._animation(i); | ||
this._animation(); | ||
} | ||
@@ -82,0 +80,0 @@ }); |
{ | ||
"name": "react-native-indicator", | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"description": "React Native Indicator Component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
861742
1020
1