Commit 5261bacf authored by Igor.Zotov's avatar Igor.Zotov

изменил ширину/высоту для картинки при создании html

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65125 954022d7-b5bf-4e40-9824-e11837661b57
parent ea2a22b2
......@@ -792,14 +792,21 @@ CopyProcessor.prototype =
var sSrc = oGraphicObj.getBase64Img();
if(sSrc.length > 0)
{
var _w = ParaItem.Extent.W;
var _h = ParaItem.Extent.H;
var _h, _w;
if(oGraphicObj.cachedPixH)
_h = oGraphicObj.cachedPixH;
else
_h = ParaItem.Extent.H * g_dKoef_mm_to_pix;
if(oGraphicObj.cachedPixW)
_w = oGraphicObj.cachedPixW;
else
_w = ParaItem.Extent.W * g_dKoef_mm_to_pix;
var oImg = new CopyElement("img");
oImg.oAttributes["style"] = "max-width:100%;";
oImg.oAttributes["width"] = Math.round(_w * g_dKoef_mm_to_pix);
oImg.oAttributes["height"] = Math.round(_h * g_dKoef_mm_to_pix);
oImg.oAttributes["width"] = Math.round(_w);
oImg.oAttributes["height"] = Math.round(_h);
oImg.oAttributes["src"] = sSrc;
oTarget.addChild(oImg);
break;
......
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