Skip to content

Commit

Permalink
[CircularProgress] Fix for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 17, 2016
1 parent b83faf9 commit 3d89a9d
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 @@ -144,7 +144,7 @@ class CircularProgress extends React.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 @@ -183,9 +183,14 @@ class CircularProgress extends React.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 3d89a9d

Please sign in to comment.