react-native-indicator
Advanced tools
Comparing version 0.6.4 to 0.6.5
@@ -22,3 +22,3 @@ /** | ||
size: 30, | ||
frequency: 500 | ||
frequency: 1000 | ||
}; | ||
@@ -29,3 +29,3 @@ | ||
this.state = { | ||
scale: new Animated.Value(1) | ||
effect: new Animated.ValueXY({x: 0, y: 1}) | ||
}; | ||
@@ -39,3 +39,3 @@ this._animation = this._animation.bind(this); | ||
<Surface width={size} height={size}> | ||
<AnimatedCircle radius={size} fill={color} scale={this.state.scale} x={size/2} y={size/2}/> | ||
<AnimatedCircle radius={size} fill={color} scale={this.state.effect.x} opacity={this.state.effect.y} x={size/2} y={size/2}/> | ||
</Surface> | ||
@@ -54,10 +54,12 @@ ); | ||
_animation() { | ||
Animated.sequence([ | ||
Animated.timing(this.state.scale, {toValue: 0.2, duration: this.props.frequency}), | ||
Animated.timing(this.state.scale, {toValue: 1, duration: this.props.frequency}) | ||
Animated.parallel([ | ||
Animated.timing(this.state.effect.x, {toValue: 1, duration: this.props.frequency}), | ||
Animated.timing(this.state.effect.y, {toValue: 0.05, duration: this.props.frequency}) | ||
]).start(() => { | ||
if (!this.unmounted) | ||
if (!this.unmounted) { | ||
this.state.effect.setValue({x: 0, y: 1}); | ||
this._animation(); | ||
} | ||
}); | ||
} | ||
} |
{ | ||
"name": "react-native-indicator", | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"description": "React Native Indicator Component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -72,3 +72,3 @@ # react-native-indicator | ||
| color | string | '#1e90ff' | indicator's color | | ||
| frequency | number | 500 | scale's frequency | | ||
| frequency | number | 1000 | scale's frequency | | ||
@@ -75,0 +75,0 @@ |
Sorry, the diff of this file is not supported yet
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
1381018
1262