Skip to content

Conversation

cwnicoletti
Copy link

I noticed in Circle.js that endAngle is only used when indeterminate is true. I figured there is a reason for this, so I decided to add another prop called alwaysUseEndAngle. Which enables endAngle whether the loader is indeterminate or not.

Also, I'm not sure if you'd like this added to the README or not, I'm assuming you do and I did so in this PR, but you never know! so let me know

radius={size / 2}
startAngle={0}
endAngle={(indeterminate ? endAngle * 2 : 2) * Math.PI}
endAngle={(indeterminate ? endAngle * 2 : alwaysUseEndAngle ? endAngle * 2 : 2) * Math.PI}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
endAngle={(indeterminate ? endAngle * 2 : alwaysUseEndAngle ? endAngle * 2 : 2) * Math.PI}
endAngle={(indeterminate || alwaysUseEndAngle ? endAngle * 2 : 2) * Math.PI}

@oblador
Copy link
Owner

oblador commented Jan 26, 2023

Thanks for your PR! Might I ask what your use case is for this? Also would you mind adding type definitions for this new prop too? Thx!

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.

2 participants