Skip to content

Commit

Permalink
Merge pull request #4026 from oliviertassinari/circular-progress-fix
Browse files Browse the repository at this point in the history
[CircularProgress] Fix for Android
  • Loading branch information
nathanmarks committed Apr 23, 2016
2 parents 390108d + 3d89a9d commit 713dc4c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/CircularProgress/CircularProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function getStyles(props, context) {
width: baseSize,
},
path: {
strokeDasharray: '89,200',
strokeDasharray: '89, 200',
strokeDashoffset: 0,
stroke: props.color || palette.primary1Color,
strokeLinecap: 'round',
Expand All @@ -57,7 +57,7 @@ function getStyles(props, context) {
if (props.mode === 'determinate') {
const relVal = getRelativeValue(value, min, max);
styles.path.transition = transitions.create('all', '0.3s', null, 'linear');
styles.path.strokeDasharray = `${Math.round(relVal * 1.25)},200`;
styles.path.strokeDasharray = `${Math.round(relVal * 1.25)}, 200`;
}

return styles;
Expand Down Expand Up @@ -137,7 +137,7 @@ class CircularProgress extends Component {
path.style.strokeDashoffset = -35;
path.style.transitionDuration = '750ms';
} else {
path.style.strokeDasharray = '89,200';
path.style.strokeDasharray = '89, 200';
path.style.strokeDashoffset = -124;
path.style.transitionDuration = '850ms';
}
Expand Down Expand Up @@ -176,9 +176,14 @@ class CircularProgress extends Component {
<div ref="wrapper" style={prepareStyles(Object.assign(styles.wrapper, innerStyle))} >
<svg style={prepareStyles(styles.svg)} >
<circle
ref="path" style={prepareStyles(styles.path)} cx="25"
cy="25" r="20" fill="none"
strokeWidth="2.5" strokeMiterlimit="10"
ref="path"
style={prepareStyles(styles.path)}
cx="25"
cy="25"
r="20"
fill="none"
strokeWidth="2.5"
strokeMiterlimit="20"
/>
</svg>
</div>
Expand Down

0 comments on commit 713dc4c

Please sign in to comment.