scottcheng / cropit

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

When I am selecting small size image It Automatically zoom #274

Open asheeshthakur opened 6 years ago

asheeshthakur commented 6 years ago

I commented some line in the file to allow image should select any size and get a preview.

 key: 'onPreImageLoaded',
        value: function onPreImageLoaded() {
          if (this.shouldRejectImage({
                imageWidth: this.preImage.width,
                imageHeight: this.preImage.height,
                previewSize: this.previewSize,
                maxZoom: this.options.maxZoom,
                exportZoom: this.options.exportZoom
            //,smallImage: this.options.smallImage  //For Allow Any size image to be make Selected 
          })) {
            this.onImageError(_constants.ERRORS.SMALL_IMAGE);
            if (this.image.src) {
              this.setImageLoadedClass();
            }
            return;
          }

After this am able to select any image but image is coming stretched, So for that what I have to do.

Thanks for your response.

image