Commit bb35b610 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50997 954022d7-b5bf-4e40-9824-e11837661b57
parent 36fb26d2
......@@ -680,12 +680,7 @@ CopyProcessor.prototype =
if(sSrc.length > 0)
{
sSrc = this.getSrc(sSrc);
if (this.api.DocumentReaderMode)
this.aInnerHtml.push("<img style=\"max-width:100%;\" width=\""+Math.round(ParaItem.W * g_dKoef_mm_to_pix)+"\" height=\""+Math.round(ParaItem.H * g_dKoef_mm_to_pix)+"\" src=\""+sSrc+"\" />");
else
this.aInnerHtml.push("<img width=\""+Math.round(ParaItem.W * g_dKoef_mm_to_pix)+"\" height=\""+Math.round(ParaItem.H * g_dKoef_mm_to_pix)+"\" src=\""+sSrc+"\" alt=\""+ParaItem.writeToBinaryForCopyPaste()+"\"/>");
this.aInnerHtml.push("<img style=\"max-width:100%;\" width=\""+Math.round(ParaItem.W * g_dKoef_mm_to_pix)+"\" height=\""+Math.round(ParaItem.H * g_dKoef_mm_to_pix)+"\" src=\""+sSrc+"\" />");
break;
}
// var _canvas = document.createElement('canvas');
......@@ -1652,14 +1647,7 @@ CopyProcessor.prototype =
}
var src = this.getSrc(base64_img);
if (this.api.DocumentReaderMode)
this.aInnerHtml.push("<img style=\"max-width:100%;\" width=\""+Math.round(cur_element.absExtX * g_dKoef_mm_to_pix)+"\" height=\""+Math.round(cur_element.absExtY * g_dKoef_mm_to_pix)+"\" src=\""+src+"\" />");
else
{
var alt_content = cur_element.parent.writeToBinaryForCopyPaste();
this.aInnerHtml.push("<img width=\""+Math.round(cur_element.absExtX * g_dKoef_mm_to_pix)+"\" height=\""+Math.round(cur_element.absExtY * g_dKoef_mm_to_pix)+"\" src=\""+src+"\" alt=\""+alt_content+"\" />");
}
this.aInnerHtml.push("<img style=\"max-width:100%;\" width=\""+Math.round(cur_element.absExtX * g_dKoef_mm_to_pix)+"\" height=\""+Math.round(cur_element.absExtY * g_dKoef_mm_to_pix)+"\" src=\""+src+"\" />");
this.ElemToSelect.appendChild( this.Para );
}
......@@ -1697,13 +1685,7 @@ CopyProcessor.prototype =
var base64_img = cur_element.getBase64Img();
var src = this.getSrc(base64_img);
if (this.api.DocumentReaderMode)
this.aInnerHtml.push("<img style=\"max-width:100%;\" width=\""+Math.round(cur_element.W * g_dKoef_mm_to_pix)+"\" height=\""+Math.round(cur_element.H * g_dKoef_mm_to_pix)+"\" src=\""+src+"\" />");
else
{
var alt_content = cur_element.writeToBinaryForCopyPaste();
this.aInnerHtml.push("<img width=\""+Math.round(cur_element.W * g_dKoef_mm_to_pix)+"\" height=\""+Math.round(cur_element.H * g_dKoef_mm_to_pix)+"\" src=\""+src+"\" alt=\""+alt_content+"\" />");
}
this.aInnerHtml.push("<img style=\"max-width:100%;\" width=\""+Math.round(cur_element.W * g_dKoef_mm_to_pix)+"\" height=\""+Math.round(cur_element.H * g_dKoef_mm_to_pix)+"\" src=\""+src+"\" />");
this.ElemToSelect.appendChild( this.Para );
......
......@@ -1929,7 +1929,8 @@ function CDrawingDocument()
this.OnRecalculatePage = function(index, pageObject)
{
this.TableOutlineDr.TableOutline = null;
if (!this.m_oWordControl.MobileTouchManager)
this.TableOutlineDr.TableOutline = null;
editor.asc_fireCallback("asc_onDocumentChanged");
if (true === this.m_bIsSearching)
{
......
......@@ -184,6 +184,7 @@ function CEditorPage(api)
this.bIsRetinaNoSupportAttack = false;
this.IsUpdateOverlayOnlyEnd = false;
this.IsUpdateOverlayOnlyEndReturn = false;
this.IsUpdateOverlayOnEndCheck = false;
this.m_oApi = api;
......@@ -562,29 +563,64 @@ function CEditorPage(api)
if (__hasTouch)
{
this.TextBoxBackground.HtmlElement["ontouchcancel"] = function (e){
return oThis.MobileTouchManager.onTouchEnd(e);
oThis.IsUpdateOverlayOnlyEndReturn = true;
oThis.StartUpdateOverlay();
var ret = oThis.MobileTouchManager.onTouchEnd(e);
oThis.IsUpdateOverlayOnlyEndReturn = false;
oThis.EndUpdateOverlay();
return ret;
}
this.TextBoxBackground.HtmlElement["ontouchstart"] = function (e){
return oThis.MobileTouchManager.onTouchStart(e);
oThis.IsUpdateOverlayOnlyEndReturn = true;
oThis.StartUpdateOverlay();
var ret = oThis.MobileTouchManager.onTouchStart(e);
oThis.IsUpdateOverlayOnlyEndReturn = false;
oThis.EndUpdateOverlay();
return ret;
}
this.TextBoxBackground.HtmlElement["ontouchmove"] = function (e){
return oThis.MobileTouchManager.onTouchMove(e);
oThis.IsUpdateOverlayOnlyEndReturn = true;
oThis.StartUpdateOverlay();
var ret = oThis.MobileTouchManager.onTouchMove(e);
oThis.IsUpdateOverlayOnlyEndReturn = false;
oThis.EndUpdateOverlay();
return ret;
}
this.TextBoxBackground.HtmlElement["ontouchend"] = function (e){
return oThis.MobileTouchManager.onTouchEnd(e);
oThis.IsUpdateOverlayOnlyEndReturn = true;
oThis.StartUpdateOverlay();
var ret = oThis.MobileTouchManager.onTouchEnd(e);
oThis.IsUpdateOverlayOnlyEndReturn = false;
oThis.EndUpdateOverlay();
return ret;
}
}
else
{
this.TextBoxBackground.HtmlElement["onmousedown"] = function (e){
return oThis.MobileTouchManager.onTouchStart(e);
oThis.IsUpdateOverlayOnlyEndReturn = true;
oThis.StartUpdateOverlay();
var ret = oThis.MobileTouchManager.onTouchStart(e);
oThis.IsUpdateOverlayOnlyEndReturn = false;
oThis.EndUpdateOverlay();
return ret;
}
this.TextBoxBackground.HtmlElement["onmousemove"] = function (e){
return oThis.MobileTouchManager.onTouchMove(e);
oThis.IsUpdateOverlayOnlyEndReturn = true;
oThis.StartUpdateOverlay();
var ret = oThis.MobileTouchManager.onTouchMove(e);
oThis.IsUpdateOverlayOnlyEndReturn = false;
oThis.EndUpdateOverlay();
return ret;
}
this.TextBoxBackground.HtmlElement["onmouseup"] = function (e){
return oThis.MobileTouchManager.onTouchEnd(e);
oThis.IsUpdateOverlayOnlyEndReturn = true;
oThis.StartUpdateOverlay();
var ret = oThis.MobileTouchManager.onTouchEnd(e);
oThis.IsUpdateOverlayOnlyEndReturn = false;
oThis.EndUpdateOverlay();
return ret;
}
}
......@@ -2654,6 +2690,9 @@ function CEditorPage(api)
}
this.EndUpdateOverlay = function()
{
if (this.IsUpdateOverlayOnlyEndReturn)
return;
this.IsUpdateOverlayOnlyEnd = false;
if (this.IsUpdateOverlayOnEndCheck)
this.OnUpdateOverlay();
......
......@@ -72,14 +72,17 @@ COverlay.prototype =
this.m_oControl.HtmlElement.style.display = "none";
},
VertLine : function(position)
VertLine : function(position, bIsSimpleAdd)
{
this.Clear();
if (this.m_bIsAlwaysUpdateOverlay || true/*мало ли что есть на оверлее*/)
if (bIsSimpleAdd !== true)
{
if (!editor.WordControl.OnUpdateOverlay())
this.Clear();
if (this.m_bIsAlwaysUpdateOverlay || true/*мало ли что есть на оверлее*/)
{
editor.WordControl.EndUpdateOverlay();
if (!editor.WordControl.OnUpdateOverlay())
{
editor.WordControl.EndUpdateOverlay();
}
}
}
......@@ -135,14 +138,17 @@ COverlay.prototype =
this.Show();
},
HorLine : function(position)
HorLine : function(position, bIsSimpleAdd)
{
this.Clear();
if (this.m_bIsAlwaysUpdateOverlay || true/*мало ли что есть на оверлее*/)
if (bIsSimpleAdd !== true)
{
if (!editor.WordControl.OnUpdateOverlay())
this.Clear();
if (this.m_bIsAlwaysUpdateOverlay || true/*мало ли что есть на оверлее*/)
{
editor.WordControl.EndUpdateOverlay();
if (!editor.WordControl.OnUpdateOverlay())
{
editor.WordControl.EndUpdateOverlay();
}
}
}
......
......@@ -2230,12 +2230,12 @@ function CMobileTouchManager()
if (0 == this.TableCurrentMoveDir)
{
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(this.TableCurrentMoveValue, 0, _table_outline_dr.CurrentPageIndex);
overlay.VertLine(_pos.X);
overlay.VertLine(_pos.X, true);
}
else
{
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(0, this.TableCurrentMoveValue, _table_outline_dr.CurrentPageIndex);
overlay.HorLine(_pos.Y);
overlay.HorLine(_pos.Y, true);
}
}
}
......@@ -2337,12 +2337,12 @@ function CMobileTouchManager()
if (0 == this.TableCurrentMoveDir)
{
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(this.TableCurrentMoveValue, 0, _table_outline_dr.CurrentPageIndex, _table_outline_dr.TableMatrix);
overlay.VertLine(_pos.X);
overlay.VertLine(_pos.X, true);
}
else
{
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(0, this.TableCurrentMoveValue,_table_outline_dr.CurrentPageIndex, _table_outline_dr.TableMatrix);
overlay.HorLine(_pos.Y);
overlay.HorLine(_pos.Y, true);
}
}
}
......@@ -2505,12 +2505,12 @@ function CMobileTouchManager()
if (0 == this.TableCurrentMoveDir)
{
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(this.TableCurrentMoveValue, 0, _table_outline_dr.CurrentPageIndex);
overlay.VertLine(_pos.X);
overlay.VertLine(_pos.X, true);
}
else
{
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(0, this.TableCurrentMoveValue, _table_outline_dr.CurrentPageIndex);
overlay.HorLine(_pos.Y);
overlay.HorLine(_pos.Y, true);
}
}
}
......@@ -2628,12 +2628,12 @@ function CMobileTouchManager()
if (0 == this.TableCurrentMoveDir)
{
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(this.TableCurrentMoveValue, 0, _table_outline_dr.CurrentPageIndex, _table_outline_dr.TableMatrix);
overlay.VertLine(_pos.X);
overlay.VertLine(_pos.X, true);
}
else
{
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(0, this.TableCurrentMoveValue,_table_outline_dr.CurrentPageIndex, _table_outline_dr.TableMatrix);
overlay.HorLine(_pos.Y);
overlay.HorLine(_pos.Y, true);
}
}
}
......
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