Foliotek / Croppie

A Javascript Image Cropper
http://foliotek.github.io/Croppie
MIT License
2.56k stars 884 forks source link

Croppie.js default image issue #359

Open sanjosedennis7593 opened 7 years ago

sanjosedennis7593 commented 7 years ago

Hi,

I currently having a problem when i set an initial value in the url. The image has been displayed correctly, however the size of the image inside the plugin is already zoomed in. And if i zoom out the image the size is too small until you can't see it anymore.

This is my code

$('#upload-demo').croppie({ url:'image/default.jpg', enableOrientation:true, viewport: { width:'100%', height: 435, type: 'square' }, boundary: { width:'100%', height: 435
} });

Does anyone know how to fix it?

Attached herewith is how the default image look like when i set a default image in the plugin.

screen shot 2017-07-31 at 1 25 49 am

Thanks

jofftiquez commented 7 years ago

Have you properly imported the css?

sanjosedennis7593 commented 7 years ago

Yes still the same issue.

agusterodin commented 6 years ago

did you ever figure out?

emilas44 commented 6 years ago

I have the exact same problem...anyone fixed it?

When saved image is binded it is zoomed in and if I try to zoom out it disappears and there is a moment on zooming it out when you can get it but something is wrong.

emilas44 commented 6 years ago

I have figured something out...when I disable Bootstrap then everything works fine....can someone verify this? I think some css rule is affecting it. Anyway need to go to sleep, will check it tomorrow.

emilas44 commented 6 years ago

OK, there is something going on if the canvas of loaded image is not loaded/shown right away in browser. Mine was under a tab and because of that the image didn't load/bind properly (read: zoomed-in and if you try to zoom-out it breaks)

But when I changed that Tab to be shown as first/active all was suddenly fine. So maybe this will help someone.

salman028 commented 6 years ago

I am having the same problem is there any fix for this issue yet