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
croppedArea and croppedAreaPixels is returned as NaN on ios portrait #456
Comments
So, after some additional testing, the crop box isn't showing on mobile at the beginning. I have to rotate my phone and then rotate it back in order to get the crop box to work. Any ideas? RPReplay_Final1681314715.MP4 |
The issue doesn't come from the iphone or the portrait mode. It comes from the modal. When the modal is closed and the cropper is rendered, it's not able to compute it's available size. |
Hi @ValentinH here is my component for cropping. const CropImage = () => { const handleCropComplete = useCallback((croppedArea, _) => { const _handleSetMedia = useCallback((data) => { const _handleZoomChange = useCallback((value) => { return ( <Title level={5} className="ml-1"> {t('tagPages.zoom')} </Title> ); }; interface StylesProps { const styles: StylesProps = { export default CropImage; |
You should check the existing closed issues with the "modal" keyword. |
I checked #428, but it does not seems to match my issue. |
If you can share a codesandbox showing the issue, I'd be happy to help. 🙂 |
I am reading the #409 it seems to match my problem. |
@ValentinH why I face with the above issue when I pass |
You are probably passing a different reference at every render. Again, with a codesandbox, I can help. |
@ValentinH I created an issue for this. #461 |
Closing as there was no answer for a while. Comment to re-open 😉 |
Describe the bug
When I am in portrait mode on an iPhone, the cropped pixels come back NaN. I have to turn my phone to landscape mode to get the crop area to show and pixels to generate.
How can I use it in portrait mode?
The text was updated successfully, but these errors were encountered: