Commit aac32ba2 by tsushima

#28696 【Biz/Web】差し替え画像が重なって表示される

parent a8ccd51c
......@@ -5088,12 +5088,11 @@ CONTENTVIEW.changeImageType4 = function(objTarget, nIndex, nIndex1) {
var tmpW = objTarget[nIndex].width * tempRatioWidth;
var tmpH = objTarget[nIndex].height * tempRatioHeight;
contextObject.fillStyle = "#FFFFFF";
contextObject.fillRect(tmpX, tmpY, tmpW+1, tmpH+1);
var aspectType = objTarget[nIndex].aspectType;
if(aspectType == '1'){
contextObject.fillStyle = "#FFFFFF";
contextObject.fillRect(tmpX, tmpY, tmpW+1, tmpH+1);
var drawObj = CONTENTVIEW.adjustAspectRatio(tmpX, tmpY, tmpW, tmpH, imageObj.width, imageObj.height);
tmpX = drawObj.drawX;
......@@ -6445,8 +6444,8 @@ CONTENTVIEW.adjustAspectRatio = function(drawX, drawY, drawW, drawH, srcImageW,
//描画エリアとソース画像の比率計算
var drawRatio = drawObj.drawW / drawObj.drawH;
var srcRatio = srcImageW / srcImageH;
console.log("drawRatio:" + drawRatio);
console.log("srcRatio:" + srcRatio);
//console.log("drawRatio:" + drawRatio);
//console.log("srcRatio:" + srcRatio);
if( drawRatio < srcRatio ){
tmpW = drawObj.drawW;
......
......@@ -473,17 +473,14 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
}
else if(mediaType == '4'){
context.fillStyle = "#FFFFFF";
context.fillRect(x, y, w, h);
if(aspectType == '1'){
context.fillStyle = "#FFFFFF";
context.fillRect(x, y, w, h);
var drawObj = CONTENTVIEW.adjustAspectRatio(x, y, w, h, img.width, img.height);
x = drawObj.drawX;
y = drawObj.drawY;
w = drawObj.drawW;
h = drawObj.drawH;
}
context.drawImage(img, x, y, w, h);
}
......@@ -820,6 +817,9 @@ CONTENTVIEW_CREATEOBJECT.listImage = function (mediaType, id, imageUrl, x, y, w,
var tmpW = w * tempRatioWidth;
var tmpH = h * tempRatioHeight;
contextObject.fillStyle = "#FFFFFF";
contextObject.fillRect(tmpX, tmpY, tmpW+1, tmpH+1);
if(aspectType == '1'){
var srcImageW = imageObj.width;
......@@ -840,10 +840,6 @@ CONTENTVIEW_CREATEOBJECT.listImage = function (mediaType, id, imageUrl, x, y, w,
// }
//
//}
contextObject.fillStyle = "#FFFFFF";
contextObject.fillRect(tmpX, tmpY, tmpW+1, tmpH+1);
var drawObj = CONTENTVIEW.adjustAspectRatio(tmpX, tmpY, tmpW, tmpH, imageObj.width, imageObj.height);
tmpX = drawObj.drawX;
tmpY = drawObj.drawY;
......
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