Open dfrench1 opened 6 months ago
I'm struggling with Codesandbox on Safari so I cannot try it but adding willChange: "transform"
to the image should help.
See https://codesandbox.io/p/sandbox/staging-voice-forked-h7rffm?file=%2Fsrc%2Findex.tsx%3A10%2C12
thanks for the quick response, i dont have access to that sandbox
It should be good now 🙂
great, i see you removed the cropSize prop which i hear causes more problems then solves. How would i update the aspect logic so that the crop area always fits the entire width/height of the image container?
You can compute it based on the width and height of the container.
Describe the bug Hi I am having a problem with object-fit and translate. When zooming and moving the image to the left or right, this causes the image to be cut off from the edge of the container. This happens when it switches between the cropped image and the cropper component. It is happening consistently on Safari browser and rarely on Chrome.
Each image has an 'Edit' button that is used to conditionally render either the Image with css translated values (when not cropping) or the Cropper component (while cropping). For ease, the sandbox is using the same image but in production it would be a variety of image width/heights
To Reproduce
https://github.com/ValentinH/react-easy-crop/assets/30437475/2f378fa6-c0d8-4173-8c5d-627ed1e07f4d
Expected behavior Image fits into the container after being translated to match behaviour on chrome browser