Commit 4d068bae authored by Oleg.Korshul's avatar Oleg.Korshul

disable body mouse events

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60159 954022d7-b5bf-4e40-9824-e11837661b57
parent a547dd04
...@@ -1288,10 +1288,7 @@ function CEditorPage(api) ...@@ -1288,10 +1288,7 @@ function CEditorPage(api)
if (false === oThis.m_oApi.bInit_word_control) if (false === oThis.m_oApi.bInit_word_control)
return; return;
if (e.preventDefault) var _isCatch = false;
e.preventDefault();
else
e.returnValue = false;
var downClick = global_mouseEvent.ClickCount; var downClick = global_mouseEvent.ClickCount;
check_MouseDownEvent(e, true); check_MouseDownEvent(e, true);
...@@ -1312,16 +1309,26 @@ function CEditorPage(api) ...@@ -1312,16 +1309,26 @@ function CEditorPage(api)
{ {
oWordControl.m_oBody.HtmlElement.style.cursor = "w-resize"; oWordControl.m_oBody.HtmlElement.style.cursor = "w-resize";
oWordControl.createSplitterDiv(true); oWordControl.createSplitterDiv(true);
_isCatch = true;
} }
else if (_x >= x2 && _x <= oWordControl.Width && _y >= y1 && _y <= y2) else if (_x >= x2 && _x <= oWordControl.Width && _y >= y1 && _y <= y2)
{ {
oWordControl.m_oBody.HtmlElement.style.cursor = "s-resize"; oWordControl.m_oBody.HtmlElement.style.cursor = "s-resize";
oWordControl.createSplitterDiv(false); oWordControl.createSplitterDiv(false);
_isCatch = true;
} }
else else
{ {
oWordControl.m_oBody.HtmlElement.style.cursor = "default"; oWordControl.m_oBody.HtmlElement.style.cursor = "default";
} }
if (_isCatch)
{
if (e.preventDefault)
e.preventDefault();
else
e.returnValue = false;
}
} }
this.onBodyMouseMove = function(e) this.onBodyMouseMove = function(e)
...@@ -1329,10 +1336,7 @@ function CEditorPage(api) ...@@ -1329,10 +1336,7 @@ function CEditorPage(api)
if (false === oThis.m_oApi.bInit_word_control) if (false === oThis.m_oApi.bInit_word_control)
return; return;
if (e.preventDefault) var _isCatch = false;
e.preventDefault();
else
e.returnValue = false;
check_MouseMoveEvent(e, true); check_MouseMoveEvent(e, true);
...@@ -1392,6 +1396,16 @@ function CEditorPage(api) ...@@ -1392,6 +1396,16 @@ function CEditorPage(api)
oWordControl.m_oBody.HtmlElement.style.cursor = "s-resize"; oWordControl.m_oBody.HtmlElement.style.cursor = "s-resize";
oWordControl.SplitterDiv.style.top = (_y - parseInt(GlobalSkin.SplitterWidthMM * g_dKoef_mm_to_pix)) + "px"; oWordControl.SplitterDiv.style.top = (_y - parseInt(GlobalSkin.SplitterWidthMM * g_dKoef_mm_to_pix)) + "px";
} }
_isCatch = true;
}
if (_isCatch)
{
if (e.preventDefault)
e.preventDefault();
else
e.returnValue = false;
} }
} }
...@@ -1438,10 +1452,7 @@ function CEditorPage(api) ...@@ -1438,10 +1452,7 @@ function CEditorPage(api)
if (false === oThis.m_oApi.bInit_word_control) if (false === oThis.m_oApi.bInit_word_control)
return; return;
if (e.preventDefault) var _isCatch = false;
e.preventDefault();
else
e.returnValue = false;
check_MouseUpEvent(e, true); check_MouseUpEvent(e, true);
...@@ -1476,6 +1487,16 @@ function CEditorPage(api) ...@@ -1476,6 +1487,16 @@ function CEditorPage(api)
oWordControl.m_oBody.HtmlElement.removeChild(oWordControl.SplitterDiv); oWordControl.m_oBody.HtmlElement.removeChild(oWordControl.SplitterDiv);
oWordControl.SplitterDiv = null; oWordControl.SplitterDiv = null;
oWordControl.SplitterType = 0; oWordControl.SplitterType = 0;
_isCatch = true;
}
if (_isCatch)
{
if (e.preventDefault)
e.preventDefault();
else
e.returnValue = false;
} }
} }
......
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