Skip to content
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

add: unfilledEndAngle prop to Circle.js #243

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cwnicoletti
Copy link

I was looking to use Progress.Circle as a semi-circle loader, however it seemed that the unfilled portion of the Circle.js component is always a constant of const CIRCLE = Math.PI * 2. I thought I'd contribute a new prop that allows users to dynamically set the end angle of the unfilled portion of the circle with the unfilledEndAngle prop. This would allow users to make a semi-circle that's unfilled.

It's written basically the same exact way as the endAngle prop.

This also makes sure no shapes are shown if unfilledEndAngle is less than or equal to the current startAngle of the <Shape /> component inside Circle.js. (Can be checked by turning the color prop to rgba(0,0,0,0))

@cwnicoletti cwnicoletti changed the title add: unfilledEndAngle prop to Circle.js, for dynamic instead of const… add: unfilledEndAngle prop to Circle.js Feb 11, 2022
@cwnicoletti
Copy link
Author

I forgot to include this change in the README, if you'd prefer it does let me know

@cwnicoletti
Copy link
Author

Honestly I was thinking too, that since I'm making this into more of an arc than a circle, maybe instead of these last 2 PR, I could create a completely different loader called Arc.js

@cwnicoletti cwnicoletti marked this pull request as draft February 11, 2022 19:36
@cwnicoletti cwnicoletti marked this pull request as ready for review February 11, 2022 20:36
@oblador
Copy link
Owner

oblador commented Jan 26, 2023

Yeah, if your use case is not a Circle, it makes more sense to add a new Arc component like you said 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants