Open mightym opened 2 days ago
Do you expect to zoom in or out? The thing is that zooming out would lead to empty spaces at the top and bottom of the image..the library prevents that by default.
However, you can set restrictPosition
to false
to disable this.
I leave you my sample image here. Also try to make your browser window smaller and larger. Both zoom direction have in the example screenshot above enough space.
Will try to prepare a screen capture video for you.
This is after I selected the image:
https://github.com/user-attachments/assets/be4c4aea-cdfd-4cbf-a765-93a2ff50c9af
The thing is that zoom: 1
means that the image covers its container. If your cropped area is squared then it's better to have the container to be a square as well.
See this quick example: https://codesandbox.io/p/sandbox/react-easy-crop-custom-image-demo-forked-cghhr6
Describe the bug When I use
objectFit="cover"
together withaspect={1} cropShape="round"
I can't zoom the image to fit the crop area. The crop area is always smaller than the possible max crop area available:In that screenshot my image is a square image. And you can see that there is still a lot of space left to zoom in. But you can't:
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect to zoom in on the image so that it fully covers the crop area.