-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Cropper component cannot move to the edges of an image when used inside a modal. #428
Comments
This is due to the opening animation of the modal conflicting with the internal logic of the cropper to compute its size. You can fix this by changing the animation to If you really don't want to change the animation, you need to wait until the animation is complete to actually render the cropper. |
Thank you so much. Closing this issue because it has resolved with the given solution. |
oh my thank you. i could have spent hours on this, but luckily i only spent an hour xD |
facing the same issue on shadcn dialog and no way to change the animation to |
The point of shading/ui is to have the full control in the component code. The animation styles are inside the |
Thank you for your response, if we have a method like |
One way to do this is to add a |
render cropper after the dialog gets open and with some(100 milliseconds) setTimeout delay resolved this issue |
A nice way to avoid a flash from empty content to the Cropper is to render a plain image by default. |
Describe the bug
I am using react-easy-crop with mantine components. Currently I am loading the cropper component inside a mantine modal. The issue is when the cropper is loaded inside a modal, I can't move it to the edges of the selected image (it's like padded). One thing I noticed is that when I open the modal and then open the console from the same window (from right, left or bottom), the above mentioned issue goes away.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should be able to move the cropper anywhere inside the selected image, so we can crop any part form that image.
The text was updated successfully, but these errors were encountered: