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

Enhance arc() to support individual corner radii for rounded corners #215

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

krystofbe
Copy link

This pull request updates the arc.js file to allow individual corners to be rounded by passing an array of numbers. This change is based on the code by murtada58 and ensures backward compatibility with the previous method of passing a single number for uniform corner rounding.

Changes include:

  • Allowing corner radius to accept an array of up to four numbers.
  • Maintaining backward compatibility by coercing single numbers.

Please review and let me know if there are any further adjustments needed.

Note: I am currently unsure how to update the d3-shape documentation to reflect these changes. Any guidance on this would be appreciated.

Here is a custom build d3.mjs.zip of D3 version 7.9.0 (d3.mjs) that includes these changes for immediate use.

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

Successfully merging this pull request may close these issues.

1 participant