mirror of
https://github.com/bartgryszko/react-native-circular-progress.git
synced 2026-01-18 16:13:10 +00:00
Merge pull request #217 from BalalRaza/patch-1
Update partial fix #215: strokeDasharray expects array of numbers
This commit is contained in:
commit
b267bef0dd
@ -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"
|
||||
/>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user