-
Notifications
You must be signed in to change notification settings - Fork 880
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Image not centering if cropping to a smaller result #238
Comments
Interesting. Could you put together demo demonstrating the whole issue? I don't know what you mean by "cropping the image to smaller view". Just a heads up, I've seen croppie do something like this when the croppie element is in a modal and it's not completely shown before the |
Here's a demo of it: The goal is to shrink the image, that way the resulting image would have some "whitespace" to it. And yes, I implemented this on a modal, I used the bind() after the modal was completely shown. |
Thanks for putting together the demo - I definitely see the issue now. I'm guessing that broke when I fixed it for safari/IE. I won't have time to work on this for a couple of weeks - so if you want to dig into it, the issue is somewhere in this function: https://github.com/Foliotek/Croppie/blob/master/croppie.js#L949 If not, I'll get to it as soon as I can. |
I'm going to close this one in favor of #247 - but you get credit for finding it first. That case just has more traction right now. |
hi there, |
It seems that the plugin is having a hard time centering when cropping the image to smaller view.
![croppie1](https://cloud.githubusercontent.com/assets/8624933/20002355/64777428-a2bb-11e6-8603-d48d02d1abc1.PNG)
![croppie2](https://cloud.githubusercontent.com/assets/8624933/20002357/65cb888c-a2bb-11e6-8422-6171e88cc4ba.PNG)
This is the code:
$uploadCrop.croppie('result', { type: 'base64', format: 'png', size: {width: 1000, height: 1000} }).then(function (resp) { $('#img-output').attr('src', resp); });
This was fixed if I removed the 'size' parameter. I need the parameter though.
The text was updated successfully, but these errors were encountered: