Skip to content

Commit

Permalink
Merge pull request #220 from aboveyunhai/master
Browse files Browse the repository at this point in the history
Fix dashbackground parsing issue and wrong center location of <G> inside <Svg>
  • Loading branch information
Markus Lindqvist authored Dec 4, 2019
2 parents f3d314a + a1f8e6c commit 993059e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CircularProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ export default class CircularProgress extends React.PureComponent {
}

const dashedBackgroundStyle = dashedBackground.gap > 0
? `${dashedBackground.width}, ${dashedBackground.gap}`
: dashedBackground;
? dashedBackground
: { width:0, gap:0 };

const strokeDasharray = Object.values(dashedBackgroundStyle)
.map(value => parseInt(value));

return (
<View style={style}>
<Svg width={size + padding} height={size + padding}>
<G rotation={rotation} originX={size / 2} originY={size / 2}>
<G rotation={rotation} originX={(size + padding) / 2} originY={(size + padding) / 2}>
{backgroundColor && (
<Path
d={backgroundPath}
Expand Down

0 comments on commit 993059e

Please sign in to comment.