Skip to content

Commit

Permalink
Fix images inserting
Browse files Browse the repository at this point in the history
Insert images as inline in mobile editors
  • Loading branch information
SergeyLuzyanin committed Mar 26, 2020
1 parent 64290bf commit 2bedbae
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions common/Native/Wrappers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4959,17 +4959,8 @@ Asc['asc_docs_api'].prototype.AddImageUrlNative = function(url, _w, _h, _pageNum
}

this.WordControl.m_oLogicDocument.StartAction();

if (undefined === _pageNum)
{
this.WordControl.m_oLogicDocument.AddInlineImage(wI, hI, url);
}
else
{
var _sectionPr = this.WordControl.m_oLogicDocument.Get_PageLimits(_pageNum);
this.AddImageToPage(url, _pageNum, (_sectionPr.XLimit - wI) / 2, (_sectionPr.YLimit - hI) / 2, wI, hI);
}

this.WordControl.m_oLogicDocument.AddInlineImage(wI, hI, url);
this.WordControl.m_oLogicDocument.Recalculate();
this.WordControl.m_oLogicDocument.FinalizeAction();
};
Asc['asc_docs_api'].prototype.AddImageUrlActionNative = function(src, _w, _h, _pageNum)
Expand Down Expand Up @@ -5853,11 +5844,6 @@ Asc['asc_docs_api'].prototype.Call_Menu_Context_SelectAll = function()
{
this.WordControl.m_oLogicDocument.SelectAll();
};
Asc['asc_docs_api'].prototype.pre_Paste = function(_fonts, _images, callback)
{
AscCommon.History.Create_NewPoint(AscDFH.historydescription_PasteNative);
callback();
};
/************************************************************************/

// chat styles
Expand Down

0 comments on commit 2bedbae

Please sign in to comment.