-
Notifications
You must be signed in to change notification settings - Fork 14
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
Zooming out in browser forces the image to disappear #187
Comments
Hi @saadsaeed01. Arguably this can help you: fengyuanchen/cropperjs#147 |
HI @MaxymGorn This is not helping me to sort out this issue. Please see the video of what's happening over here. https://www.loom.com/share/dca17ddfcb5f4b2285b37903d7a56792?sid=6895b4ba-8308-457f-9035-18cd3d50f1df We needed to somehow intercept the zoom event if the cursor is not over the cropper and make sure it doesn't change the styles of the inner div elements Waiting for your response! |
@saadsaeed01 Yes, I see your problem. I have the same one in an empty project, at the moment I don't know a clear reason why this happens! Maybe you need some styles for the cropper element or its container. It seems that there is no such problem on the demo cropper website, I am still trying to find out what could have caused this |
In addition, I think it is worth writing about this problem in the cropper.js repository, most likely, the author of the library will know the answer. Repository cropper.js: https://github.com/fengyuanchen/cropperjs |
Hi @MaxymGorn I have created a solution that works for me!
|
Hi @saadsaeed01. Great solution. I just some refactored this code and adding check when the cropper module is unloaded or there are no croppers at all:
|
Description
On certain width and height of the parent div in which the cropper component is placed, the image starts to get disappear.
To Reproduce
Steps to reproduce the behavior:
I am setting the CanvasWidth (200px) and CanvasHeight(70px) for the div in which the cropper is placed
If I zoom out the browser window the image starts to get disappear
Initial state
Zoom out (67%)
Expected behavior
If I set CanvasWidth (200px) and CanvasHeight(100px), then this problem does not happen
Zoom out (67%) {Note that image is not disappearing now}
What can be the possible reason behind this behavior?
Desktop
The text was updated successfully, but these errors were encountered: