react-native-circular-progress
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "react-native-circular-progress", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "React Native component for creating animated, circular progress with ReactART", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -58,2 +58,3 @@ # react-native-circular-progress | ||
- **fill** - current, percentage fill (from 0 to 100) | ||
- **prefill** - percentage fill before the animation (from 0 to 100) | ||
- **tintColor** - color of a progress line | ||
@@ -60,0 +61,0 @@ - **backgroundColor** - color of a background for progress line |
@@ -8,6 +8,6 @@ import React, { PropTypes, Animated } from 'react-native'; | ||
constructor() { | ||
super(); | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
chartFillAnimation: new Animated.Value(0) | ||
chartFillAnimation: new Animated.Value(props.prefill || 0) | ||
} | ||
@@ -38,3 +38,3 @@ } | ||
render() { | ||
const { fill, ...other } = this.props; | ||
const { fill, prefill, ...other } = this.props; | ||
@@ -54,5 +54,6 @@ return ( | ||
fill: PropTypes.number.isRequired, | ||
prefill: PropTypes.number, | ||
width: PropTypes.number.isRequired, | ||
tintColor: PropTypes.string, | ||
backgroundColor: PropTypes.string | ||
backgroundColor: PropTypes.string, | ||
} |
@@ -42,4 +42,2 @@ import React, { View, PropTypes } from 'react-native'; | ||
stroke={backgroundColor} | ||
strokeCap="butt" | ||
strokeDash={[(size - width) * Math.PI, 700]} | ||
strokeWidth={width} /> | ||
@@ -49,3 +47,3 @@ <Shape d={circlePath} | ||
strokeCap="butt" | ||
strokeDash={[(size - width) * Math.PI * fill / 100, 700]} | ||
strokeDash={[(size - width) * Math.PI * fill / 100, 9999]} | ||
strokeWidth={width} /> | ||
@@ -52,0 +50,0 @@ </Group> |
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
368992
79
113