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

react-cropper not rendering image when viewMode and zoomTo both are set to 0 #287

Closed
Chetnatl opened this issue Aug 27, 2020 · 9 comments
Closed

Comments

@Chetnatl
Copy link

I was using react-cropper with version 2.0.0. It was working properly. but when I updated it with the latest version(2.1.0). It is showing me a blank image after selecting an image and no crop functionality is applying on it.

You see the below screenshot:
using 2.0.0
image

using 2.1.0
image

I need immediate the solution to this issue because I'm using this into my project.

@Chetnatl Chetnatl added the bug label Aug 27, 2020
@Chetnatl Chetnatl changed the title It is not working in the version 2.1.0 react-cropper is not working in the version 2.1.0 Aug 27, 2020
@sherry-li-or
Copy link

Have the same problem!!!

@shekhar-shubhendu
Copy link
Collaborator

shekhar-shubhendu commented Aug 27, 2020

@shekhar-shubhendu if you need an immediate fix for this then it is available in v2.1.1-0.

Duplicate of #267

@Chetnatl
Copy link
Author

@shekhar-shubhendu this is not duplicate of #267. When I pass ref. it is giving me an error.

@alabobriggs
Copy link

having same issue

@shekhar-shubhendu
Copy link
Collaborator

shekhar-shubhendu commented Aug 27, 2020

@Chetnatl then please provide a repro (in codesandbox) for this and also did you try using v2.1.1-0 what is the issue you are facing using that?

@Chetnatl
Copy link
Author

Chetnatl commented Aug 27, 2020

When I use v2.1.1-0

image

@alabobriggs
Copy link

Fixed issue by upgrading to 2.1.1-0

@shekhar-shubhendu
Copy link
Collaborator

@Chetnatl I think I found the issue you are facing.
In one of the PRs, a community member changed the default value of zoomTo from 1 to 0. It was to fix another issue. For more info, please take a look here #268.
And the above change seems to be 'causing the issue if the viewMode is set to 0 which is cropperjs default.

For now, to make the image render inside the cropper either set the zoomTo prop or viewMode to any value except 0.

I'll try to investigate further on this in my free time.
thanks :)

@shekhar-shubhendu shekhar-shubhendu changed the title react-cropper is not working in the version 2.1.0 react-cropper not rendering image when viewMode and zoomTo both are set to 0 Aug 31, 2020
@shekhar-shubhendu
Copy link
Collaborator

closing as this should be resolved with v2.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants