Skip to content

Commit

Permalink
Removed bouncing effect on progress to solve a bug with bar width som…
Browse files Browse the repository at this point in the history
…etimes starting out at 100%.
  • Loading branch information
oblador committed Nov 5, 2015
1 parent b90d8e1 commit 57070e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ var ProgressBar = React.createClass({
if(props.animated) {
Animated.spring(this.state.progress, {
toValue: progress,
bounciness: 0,
}).start();
} else {
this.state.progress.setValue(progress);
Expand Down Expand Up @@ -117,7 +118,7 @@ var ProgressBar = React.createClass({
height,
width: this.state.progress.interpolate({
inputRange: [0, 1],
outputRange: [2, width],
outputRange: [0, width],
}),
transform: [{
translateX: this.state.animationValue.interpolate({
Expand Down
1 change: 1 addition & 0 deletions makeAnimatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var makeAnimatable = function(Component, indeterminateProgress) {
if(props.animated) {
Animated.spring(this.state.animationValue, {
toValue: progress,
bounciness: 0,
}).start();
} else {
this.setState({ progress });
Expand Down

0 comments on commit 57070e1

Please sign in to comment.