-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom start #81
Conversation
rkyle35242
commented
Apr 25, 2024
•
edited
Loading
edited
Before | After (angleStart = 90) |
---|---|
@@ -41,7 +42,7 @@ export const SegmentedArc = ({ | |||
const totalSpacing = totalSpaces * spaceBetweenSegments; | |||
|
|||
const arcSegmentDegree = (arcDegree - totalSpacing) / totalArcs; | |||
const arcsStart = 90 - arcDegree / 2; | |||
const arcsStart = angleStart || 90 - arcDegree / 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think it's worth documenting any guidance on realistic values here? Or does it feel pretty obvious. Code makes sense, just thinking aloud
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is an unrealistic value. Starting at 720 would just effectively be 0, since the value represents degrees.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about arcStartDegree
? Also, would you be able to update docs too along with the previously added arcDegreeScale
property? Could be done separately. https://github.com/shipt/segmented-arc-for-react-native?tab=readme-ov-file#-props
This reverts commit 4b688c1.
"animationDuration": 1000, | ||
"arcAnimatedValue": 0, | ||
"arcSegmentDegree": 43.5, | ||
"arcsStart": 420, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
I'm actually going to close this. The use case I had in mind is no longer valid and this doesn't work in all cases that I'd like it to. That being said, I will take some time to update the README to support the new scale property for segments |