cropit icon indicating copy to clipboard operation
cropit copied to clipboard

previewSize undefined still happening

Open ghost opened this issue 8 years ago • 5 comments

I've just tried the last version to update my code that used the 0.4 version, and I got a 'previewSize undefined' error. After few investigation I found issue #165 and also noticed that the last commit was about this bug.

This is strange because the bug is actually supposed to be fixed. I did a couple of tries and even with the most simple demo code I was getting the error.

I managed to make my code work by fixing the .cropit-preview div's width and height, but I found strange that the bug still happens.

ghost avatar May 19 '16 14:05 ghost

same here please help !!

deveshgoyal avatar Aug 05 '16 07:08 deveshgoyal

Could someone fix this? I have the same error.

jircdev avatar Oct 07 '16 22:10 jircdev

set width and height properties

      $('#image-cropper').cropit({

        width: "400px",
        height: "400px"
      });

drj-io avatar Oct 18 '16 03:10 drj-io

I got the error when I used this: preview: $('.cropit-preview-logo') Instead of this: $preview: $('.cropit-preview-logo')

tomasswood avatar Oct 27 '16 00:10 tomasswood

According to the documentation of 'Initialization options' section here: http://scottcheng.github.io/cropit/, the default value is supposed to be '$imageCropper.find('.cropit-preview')'

However searching the code I don't think it is executed at all. That's why $preview is undefined when I did not expect it to be.

kongakong avatar Nov 28 '16 02:11 kongakong