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

scroll word

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55970 954022d7-b5bf-4e40-9824-e11837661b57
parent fd8af456
...@@ -1117,10 +1117,19 @@ ScrollObject.prototype = { ...@@ -1117,10 +1117,19 @@ ScrollObject.prototype = {
getMaxScrolledX:function () { getMaxScrolledX:function () {
return this.maxScrollX; return this.maxScrollX;
}, },
getIsLockedMouse : function()
{
return (this.that.mouseDownArrow || this.that.mouseDown);
},
/************************************************************************/ /************************************************************************/
/*events*/ /*events*/
evt_mousemove:function ( e ) { evt_mousemove:function ( e ) {
var evt = e || windows.event; var evt = e || window.event;
if (evt.preventDefault)
evt.preventDefault();
else
evt.returnValue = false;
var mousePos = this.that.getMousePosition( evt ); var mousePos = this.that.getMousePosition( evt );
this.that.EndMousePosition.x = mousePos.x; this.that.EndMousePosition.x = mousePos.x;
this.that.EndMousePosition.y = mousePos.y; this.that.EndMousePosition.y = mousePos.y;
...@@ -1230,7 +1239,12 @@ ScrollObject.prototype = { ...@@ -1230,7 +1239,12 @@ ScrollObject.prototype = {
}, },
evt_mouseout:function ( e ) { evt_mouseout:function ( e ) {
var evt = e || windows.event; var evt = e || window.event;
if (evt.preventDefault)
evt.preventDefault();
else
evt.returnValue = false;
if ( this.that.settings.showArrows ) { if ( this.that.settings.showArrows ) {
this.that.mouseDownArrow = false; this.that.mouseDownArrow = false;
if ( this.that.nonePointer ) { if ( this.that.nonePointer ) {
...@@ -1246,7 +1260,12 @@ ScrollObject.prototype = { ...@@ -1246,7 +1260,12 @@ ScrollObject.prototype = {
this.that._draw(); this.that._draw();
}, },
evt_mouseup:function ( e ) { evt_mouseup:function ( e ) {
var evt = e || windows.event; var evt = e || window.event;
if (evt.preventDefault)
evt.preventDefault();
else
evt.returnValue = false;
var mousePos = this.that.getMousePosition( evt ); var mousePos = this.that.getMousePosition( evt );
this.that.scrollTimeout && clearTimeout( this.that.scrollTimeout ); this.that.scrollTimeout && clearTimeout( this.that.scrollTimeout );
this.that.scrollTimeout = null; this.that.scrollTimeout = null;
...@@ -1276,7 +1295,12 @@ ScrollObject.prototype = { ...@@ -1276,7 +1295,12 @@ ScrollObject.prototype = {
this.that.handleEvents( "onmouseup", evt ); this.that.handleEvents( "onmouseup", evt );
}, },
evt_mousedown:function ( e ) { evt_mousedown:function ( e ) {
var evt = e || windows.event; var evt = e || window.event;
if (evt.preventDefault)
evt.preventDefault();
else
evt.returnValue = false;
var mousePos = this.that.getMousePosition( evt ); var mousePos = this.that.getMousePosition( evt );
var downHover = this.that._MouseHoverOnArrowDown( mousePos ); var downHover = this.that._MouseHoverOnArrowDown( mousePos );
var upHover = this.that._MouseHoverOnArrowUp( mousePos ); var upHover = this.that._MouseHoverOnArrowUp( mousePos );
...@@ -1393,7 +1417,13 @@ ScrollObject.prototype = { ...@@ -1393,7 +1417,13 @@ ScrollObject.prototype = {
} }
}, },
evt_mousewheel:function ( e ) { evt_mousewheel:function ( e ) {
var evt = e || windows.event, delta = 1; var evt = e || window.event;
if (evt.preventDefault)
evt.preventDefault();
else
evt.returnValue = false;
var delta = 1;
if ( this.that.isHorizontalScroll ) return; if ( this.that.isHorizontalScroll ) return;
var mp = {}, isTop = false, isBottom = false; var mp = {}, isTop = false, isBottom = false;
if ( undefined != evt.wheelDelta ) if ( undefined != evt.wheelDelta )
......
...@@ -1760,6 +1760,17 @@ function CEditorPage(api) ...@@ -1760,6 +1760,17 @@ function CEditorPage(api)
if (oWordControl.m_oVerRuler.DragType != 0) if (oWordControl.m_oVerRuler.DragType != 0)
oWordControl.m_oVerRuler.OnMouseUpExternal(); oWordControl.m_oVerRuler.OnMouseUpExternal();
if ( oWordControl.m_oScrollVerApi.getIsLockedMouse() )
{
var __e = { clientX : x, clientY : y };
oWordControl.m_oScrollVerApi.evt_mouseup(__e);
}
if ( oWordControl.m_oScrollHorApi.getIsLockedMouse() )
{
var __e = { clientX : x, clientY : y };
oWordControl.m_oScrollHorApi.evt_mouseup(__e);
}
global_mouseEvent.Sender = null; global_mouseEvent.Sender = null;
global_mouseEvent.UnLockMouse(); global_mouseEvent.UnLockMouse();
......
...@@ -381,16 +381,6 @@ function Window_OnMouseUp(e) ...@@ -381,16 +381,6 @@ function Window_OnMouseUp(e)
} }
} }
} }
if (window.editor !== undefined)
{
editor.WordControl.m_oDrawingDocument.UnlockCursorType();
editor.WordControl.m_oDrawingDocument.SetCursorType("default");
if( editor.WordControl.m_oScrollVerApi )
editor.WordControl.m_oScrollVerApi.evt_mouseup(e);
if( editor.WordControl.m_oScrollHorApi )
editor.WordControl.m_oScrollHorApi.evt_mouseup(e);
}
} }
InitCaptureEvents(); InitCaptureEvents();
......
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