Commit bdf19f53 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

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

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