|
|
@@ -2676,7 +2676,7 @@ function setPage(pageData,pageSize){ |
|
|
|
|
|
|
|
canvas = document.getElementById("myCanvas"); |
|
|
|
context = canvas.getContext("2d"); |
|
|
|
maxWidth = document.getElementById("showPic").offsetWidth; |
|
|
|
maxWidth = document.getElementById("showPic").offsetWidth-56; |
|
|
|
maxHeight = document.getElementById("showPic").offsetHeight-100; |
|
|
|
canvas.width = maxWidth; |
|
|
|
canvas.height = maxHeight; |
|
|
@@ -2856,11 +2856,17 @@ function isJSON(str) { |
|
|
|
canvas.width = img.width;// maxWidth document.getElementById("tool0").offsetWidth; |
|
|
|
canvas.height =img.height;//maxHeight document.getElementById("tool0").offsetWidth/1280*720; |
|
|
|
//调整画布大小 |
|
|
|
if ((img.width/img.height)<(canvas.width/canvas.height)){ |
|
|
|
canvas.width=canvas.height * img.width / img.height; |
|
|
|
// if ((img.width/img.height)>(maxWidth/maxWidth)){ |
|
|
|
// canvas.width=canvas.height * img.width / img.height; |
|
|
|
// } |
|
|
|
// else{ |
|
|
|
// canvas.height=canvas.width * img.height / img.width; |
|
|
|
// } |
|
|
|
if(canvas.width>maxWidth){ |
|
|
|
canvas.width = maxWidth |
|
|
|
} |
|
|
|
else{ |
|
|
|
canvas.height=canvas.width * img.height / img.width; |
|
|
|
if(canvas.height>maxHeight){ |
|
|
|
canvas.height=maxHeight |
|
|
|
} |
|
|
|
|
|
|
|
maxIdNum=0; |
|
|
|