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

Rounded corners #67

Closed
emongelo opened this issue Jan 22, 2018 · 4 comments
Closed

Rounded corners #67

emongelo opened this issue Jan 22, 2018 · 4 comments

Comments

@emongelo
Copy link

I found your component pretty awesome. I could make a lot of customizations but now I don't know how to add rounded corners support. Did you try or do you know how to make it possible?

Thanks!

@zhanziyang
Copy link
Owner

zhanziyang commented Jan 23, 2018

Do you just want the component UI to have rounded corners or you want the output image to have rounded corners?

If it's the former, then you can achieve it easily by modifying the css style of .croppa-container. Apply border-radius to this class selector. See example here (the "Appearance" section).

If it's the latter, maybe I will implement this feature in the next version. Good suggestion, thanks!

@emongelo
Copy link
Author

Unfortunately, I was talking about a 'circle crop' functionality.

@zhanziyang
Copy link
Owner

zhanziyang commented Jan 28, 2018

Please try new version 1.2.0:

  • New prop: image-border-radius
    Set rounded corders to image. Note that this has effect on the output image. And it only works when prevent-white-space is true.
    Demo

You can also write a clip-plugin yourself to apply other shapes: Demo

@emongelo
Copy link
Author

Awesome bro! It's exactly what I needed. It works as expected. Thank you!

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

No branches or pull requests

2 participants