Commit 8f029a2a by Kim Eunchul

#41178【課題5】[TTSSBiz Web]PDF閲覧時障害

parent f3dc2f5c
......@@ -4781,14 +4781,16 @@ CONTENTVIEW.flip = function(opt) {
if (CONTENTVIEW.srcRect.left < 0) {
CONTENTVIEW.srcRect.left = 0;
CONTENTVIEW.srcRect.right = CONTENTVIEW.srcRect.left + CONTENTVIEW.srcRect.width;
} else if (CONTENTVIEW.srcRect.right > offscreen.width) {
}
if (CONTENTVIEW.srcRect.right > offscreen.width) {
CONTENTVIEW.srcRect.left = offscreen.width - CONTENTVIEW.srcRect.width;
CONTENTVIEW.srcRect.right = offscreen.width;
}
if (CONTENTVIEW.srcRect.top < 0) {
CONTENTVIEW.srcRect.top = 0;
CONTENTVIEW.srcRect.bottom = CONTENTVIEW.srcRect.top + CONTENTVIEW.srcRect.height;
} else if (CONTENTVIEW.srcRect.bottom > offscreen.height) {
}
if (CONTENTVIEW.srcRect.bottom > offscreen.height) {
CONTENTVIEW.srcRect.top = offscreen.height - CONTENTVIEW.srcRect.height;
CONTENTVIEW.srcRect.bottom = offscreen.height;
}
......@@ -5122,8 +5124,8 @@ CONTENTVIEW.flip = function(opt) {
context.translate(-(canvas.width/2),-(canvas.height/2));
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
//if(w > width) w = width;
//if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
......@@ -5133,8 +5135,8 @@ CONTENTVIEW.flip = function(opt) {
context.translate(-(canvas.width/2),-(canvas.height/2));
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
//if(w > width) w = width;
// if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
......@@ -5142,8 +5144,8 @@ CONTENTVIEW.flip = function(opt) {
}else{
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
// if(w > width) w = width;
// if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
......@@ -5312,8 +5314,6 @@ CONTENTVIEW.flip = function(opt) {
context.translate(-(canvas.width/2),-(canvas.height/2));
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
......@@ -5323,8 +5323,6 @@ CONTENTVIEW.flip = function(opt) {
context.translate(-(canvas.width/2),-(canvas.height/2));
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
......@@ -5332,8 +5330,6 @@ CONTENTVIEW.flip = function(opt) {
}else{
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment