* @param {Object} file
*/
"inspect" : true,
+ /**
+ * @event beforeupload
+ * Fire before xhr upload the file
+ * @param {Roo.dialog.UploadCropbox} this
+ * @param {Object} data
+ */
+ "upload" : true,
/**
* @event upload
* Fire when xhr upload the file
cropData : false,
minWidth : 300,
minHeight : 300,
+ outputMaxWidth : 1200,
file : false,
exif : {},
baseRotate : 1,
sx = sx < 0 ? 0 : (sx / this.getScaleLevel());
sy = sy < 0 ? 0 : (sy / this.getScaleLevel());
- if(canvas.width > 1200) {
- var scale = 1200 / canvas.width;
+ if(canvas.width > this.outputMaxWidth) {
+ var scale = this.outputMaxWidth / canvas.width;
canvas.width = canvas.width * scale;
canvas.height = canvas.height * scale;
context.scale(scale, scale);