Croppr.js icon indicating copy to clipboard operation
Croppr.js copied to clipboard

TypeError: this.box is undefined

Open phpfui opened this issue 6 years ago • 0 comments

I am getting a TypeError: this.box is undefined error when I do the following:

var id7=new Croppr('#id7',{aspectRatio:1,startSize:[136,136],onCropEnd:function(value){$('#id3').val(value.x);$('#id4').val(value.y);$('#id5').val(value.height);$('#id6').val(value.width);}});
id7.resizeTo(136,136);
id7.moveTo(10,9);

I am not sure why Box is not initialized on creation. I am trying to set the crop window (from a previously stored crop) on the original image. Happens on both resizeTo and moveTo

Any ideas?

phpfui avatar Nov 21 '19 21:11 phpfui