Merge pull request #217 from BalalRaza/patch-1

Update partial fix #215: strokeDasharray expects array of numbers
This commit is contained in:
Markus Lindqvist 2019-11-01 10:01:52 +02:00 committed by GitHub
commit b267bef0dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,6 +88,9 @@ export default class CircularProgress extends React.PureComponent {
const dashedBackgroundStyle = dashedBackground.gap > 0
? `${dashedBackground.width}, ${dashedBackground.gap}`
: dashedBackground;
const strokeDasharray = Object.values(dashedBackgroundStyle)
.map(value => parseInt(value));
return (
<View style={style}>
@ -99,7 +102,7 @@ export default class CircularProgress extends React.PureComponent {
stroke={backgroundColor}
strokeWidth={backgroundWidth || width}
strokeLinecap={lineCap}
strokeDasharray={Object.values(dashedBackgroundStyle)}
strokeDasharray={strokeDasharray}
fill="transparent"
/>
)}