Closed shashankrepo closed 3 years ago
The path that animates is calculated as a circle and it can not be changed. To make sure that it is a circle we need the width and height to be the same. That is why there is one prop size
to change.
If you want to change the path that animates you can fork the repo and change it here
Can you please explain the path
const path = m ${halfSize},${halfStrokeWith} a ${arcRadius},${arcRadius} 0 ${rotationIndicator} 0,${arcDiameter} a ${arcRadius},${arcRadius} 0 ${rotationIndicator} 0,-${arcDiameter}
You will need to define your rectangular as SVG points and pass them to the d
attrbiute - https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d. Some more info https://css-tricks.com/svg-path-syntax-illustrated-guide/
You will need to pass also pathLength
- like if you want a square of 100px then the pathLength
will be 4 * 100 = 400
The path
above is composed of 2 arcs, which make the circle.
I am closing this issue. Please start a new discussion in case you have more questions.
Can we have
width
&height
props instead ofsize
?