|
@@ -692,8 +692,8 @@ var app = new Vue({
|
|
|
}
|
|
}
|
|
|
var cdata = $("#cropImg").cropper('getCanvasData');
|
|
var cdata = $("#cropImg").cropper('getCanvasData');
|
|
|
if(cdata.width>cropWidth){
|
|
if(cdata.width>cropWidth){
|
|
|
- var rate = cropWidth/cdata.width;
|
|
|
|
|
- $("#cropImg").cropper("zoom", rate);
|
|
|
|
|
|
|
+ var rate = (cdata.width-cropWidth)/cropWidth;
|
|
|
|
|
+ $("#cropImg").cropper("zoom", -rate);
|
|
|
}
|
|
}
|
|
|
console.log(cropWidth+'+'+cropHeight);
|
|
console.log(cropWidth+'+'+cropHeight);
|
|
|
console.log(iWidth+'+'+iHeight);
|
|
console.log(iWidth+'+'+iHeight);
|