scottcheng / cropit

A "customizable crop and zoom" jQuery plugin.
http://scottcheng.github.io/cropit/
MIT License
874 stars 307 forks source link

Browser resize keep proportions #269

Open MarT0oo opened 6 years ago

MarT0oo commented 6 years ago

Hello,

I want to ask if there's a way to keep the proportions of the image while resizing the browser? This may need recalculating the scale and transitions of the image.

Here's my code:

$('#image-cropper').cropit({
    imageState: {
        src: defaultImage,
    },
    smallImage: 'allow',
    maxZoom: 5,
    initialZoom: 'image'
});