* @cfg {Number} minWidth default 300
* @cfg {Number} minHeight default 300
* @cfg {Number} outputMaxWidth default 1200
+ * @cfg {Number} windowSize default 300
* @cfg {Array} buttons default ['rotateLeft', 'pictureBtn', 'rotateRight']
* @cfg {Boolean} isDocument (true|false) default false
* @cfg {String} url action url
minWidth : 300,
minHeight : 300,
outputMaxWidth : 1200,
+ windowSize : 300,
file : false,
exif : {},
baseRotate : 1,
e.stopEvent();
this.startScale = this.scale;
- this.scale = (e.getWheelDelta() == 1) ? (this.scale + 1) : (this.scale - 1);
+ this.scale = (e.getWheelDelta() > 0) ? (this.scale + 1) : (this.scale - 1);
+
+ console.log("START SCALE: " + this.startScale);
+ console.log("TEST SCALE: " + this.scale);
if(!this.zoomable()){
this.scale = this.startScale;
var width = Math.ceil(this.imageEl.OriginWidth * this.getScaleLevel() / minScale);
var height = Math.ceil(this.imageEl.OriginHeight * this.getScaleLevel() / minScale);
-
+ console.log("IMAGE WIDTH: " + width);
+ console.log("IMAGE HEIGHT: " + height);
+ console.log("WINDOW WIDTH: ");
+ console.log("WINDOW HEIGHT: ");
+
var maxWidth = this.imageEl.OriginWidth;
var maxHeight = this.imageEl.OriginHeight;
}
}
- height = 300;
+ height = this.windowSize;
width = Math.ceil(this.minWidth * height / this.minHeight);
if(this.minWidth > this.minHeight){
- width = 300;
+ width = this.windowSize;
height = Math.ceil(this.minHeight * width / this.minWidth);
}
formData.append('returnHTML', 'NO');
- console.log("cropType: " + this.cropType);
-
if(crop){
formData.append('crop', crop);
var blobBin = atob(crop.split(',')[1]);
}
this.file = file;
- if(typeof(file.type) != 'undefined') {
+ if(typeof(file.type) != 'undefined' && file.type.length != 0) {
this.cropType = file.type;
}