Skip to content

Commit

Permalink
Merge pull request react-bootstrap#531 from YannPl/YannPl-patch-396
Browse files Browse the repository at this point in the history
[fixed] ProgressBar percentage issue when stacked
  • Loading branch information
mtscout6 committed Apr 17, 2015
2 parents 527e21f + 276c2bc commit 52719ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ProgressBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const ProgressBar = React.createClass({
},

getPercentage(now, min, max) {
return Math.ceil((now - min) / (max - min) * 100);
let roundPrecision = 1000;
return Math.round(((now - min) / (max - min) * 100) * roundPrecision) / roundPrecision;
},

render() {
Expand Down

0 comments on commit 52719ff

Please sign in to comment.