Commit 7567cadb authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

fix: Bug 12788 - Вертикальная полоса прокрутки некорректно работает при...

fix: Bug 12788 - Вертикальная полоса прокрутки некорректно работает при захвате левой кнопкой мыши, когда отпускать ее помимо захваченного элемента
поправлен синтаксис функций.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51046 954022d7-b5bf-4e40-9824-e11837661b57
parent 98f42b79
...@@ -271,6 +271,7 @@ function ScrollObject( elemID, settings, dbg ) { ...@@ -271,6 +271,7 @@ function ScrollObject( elemID, settings, dbg ) {
this.moveble = false; this.moveble = false;
this.lock = false; this.lock = false;
this.scrollTimeout = null;
this.StartMousePosition = {x:0, y:0}; this.StartMousePosition = {x:0, y:0};
this.EndMousePosition = {x:0, y:0}; this.EndMousePosition = {x:0, y:0};
...@@ -1122,6 +1123,8 @@ ScrollObject.prototype = { ...@@ -1122,6 +1123,8 @@ ScrollObject.prototype = {
evt_mouseup:function ( e ) { evt_mouseup:function ( e ) {
var evt = e || windows.event; var evt = e || windows.event;
var mousePos = this.that.getMousePosition( evt ); var mousePos = this.that.getMousePosition( evt );
this.that.scrollTimeout && clearTimeout( this.that.scrollTimeout );
this.that.scrollTimeout = null;
if ( !this.that.scrollerMouseDown ) { if ( !this.that.scrollerMouseDown ) {
if ( this.that.settings.showArrows && this.that._MouseHoverOnArrowDown( mousePos ) ) { if ( this.that.settings.showArrows && this.that._MouseHoverOnArrowDown( mousePos ) ) {
this.that.handleEvents( "onmouseup", evt ); this.that.handleEvents( "onmouseup", evt );
...@@ -1178,7 +1181,6 @@ ScrollObject.prototype = { ...@@ -1178,7 +1181,6 @@ ScrollObject.prototype = {
direction = mousePos.y - this.that.scroller.y - this.that.scroller.h / 2, direction = mousePos.y - this.that.scroller.y - this.that.scroller.h / 2,
step = this.that.paneHeight * this.that.settings.scrollPagePercent, step = this.that.paneHeight * this.that.settings.scrollPagePercent,
verticalDragPosition = this.that.scroller.y, verticalDragPosition = this.that.scroller.y,
scrollTimeout,
isFirst = true, isFirst = true,
doScroll = function () { doScroll = function () {
_tmp.that.lock = true; _tmp.that.lock = true;
...@@ -1204,12 +1206,12 @@ ScrollObject.prototype = { ...@@ -1204,12 +1206,12 @@ ScrollObject.prototype = {
return; return;
} }
} }
scrollTimeout = setTimeout( doScroll, isFirst ? _tmp.that.settings.initialDelay : _tmp.that.settings.trackClickRepeatFreq ); _tmp.that.scrollTimeout = setTimeout( doScroll, isFirst ? _tmp.that.settings.initialDelay : _tmp.that.settings.trackClickRepeatFreq );
isFirst = false; isFirst = false;
}, },
cancelClick = function () { cancelClick = function () {
scrollTimeout && clearTimeout( scrollTimeout ); _tmp.that.scrollTimeout && clearTimeout( _tmp.that.scrollTimeout );
scrollTimeout = null; _tmp.that.scrollTimeout = null;
_tmp.that.unbind( "mouseup.main", cancelClick ); _tmp.that.unbind( "mouseup.main", cancelClick );
_tmp.that.lock = false; _tmp.that.lock = false;
}; };
...@@ -1221,7 +1223,6 @@ ScrollObject.prototype = { ...@@ -1221,7 +1223,6 @@ ScrollObject.prototype = {
direction = mousePos.x - this.that.scroller.x - this.that.scroller.w / 2, direction = mousePos.x - this.that.scroller.x - this.that.scroller.w / 2,
step = this.that.paneWidth * this.that.settings.scrollPagePercent, step = this.that.paneWidth * this.that.settings.scrollPagePercent,
horizontalDragPosition = this.that.scroller.x, horizontalDragPosition = this.that.scroller.x,
scrollTimeout,
isFirst = true, isFirst = true,
doScroll = function () { doScroll = function () {
_tmp.that.lock = true; _tmp.that.lock = true;
...@@ -1247,12 +1248,12 @@ ScrollObject.prototype = { ...@@ -1247,12 +1248,12 @@ ScrollObject.prototype = {
return; return;
} }
} }
scrollTimeout = setTimeout( doScroll, isFirst ? _tmp.that.settings.initialDelay : _tmp.that.settings.trackClickRepeatFreq ); _tmp.that.scrollTimeout = setTimeout( doScroll, isFirst ? _tmp.that.settings.initialDelay : _tmp.that.settings.trackClickRepeatFreq );
isFirst = false; isFirst = false;
}, },
cancelClick = function () { cancelClick = function () {
scrollTimeout && clearTimeout( scrollTimeout ); _tmp.that.scrollTimeout && clearTimeout( _tmp.that.scrollTimeout );
scrollTimeout = null; _tmp.that.scrollTimeout = null;
_tmp.that.unbind( "mouseup.main", cancelClick ); _tmp.that.unbind( "mouseup.main", cancelClick );
_tmp.that.lock = false; _tmp.that.lock = false;
}; };
......
...@@ -2449,7 +2449,7 @@ cFormulaFunction.Statistical = { ...@@ -2449,7 +2449,7 @@ cFormulaFunction.Statistical = {
r.getInfo = function () { r.getInfo = function () {
return { return {
name:this.name, name:this.name,
args:"( number-successes , number-trials , success-probability )" args:"( number-failures , number-successes , success-probability )"
}; };
} }
return r; return r;
...@@ -2924,7 +2924,7 @@ cFormulaFunction.Statistical = { ...@@ -2924,7 +2924,7 @@ cFormulaFunction.Statistical = {
r.getInfo = function () { r.getInfo = function () {
return { return {
name:this.name, name:this.name,
args:"( argument-list )" args:"( array , x [ , significance ] )"
}; };
} }
return r; return r;
......
...@@ -978,7 +978,9 @@ ...@@ -978,7 +978,9 @@
/** @param event {jQuery.Event} */ /** @param event {jQuery.Event} */
_onWindowMouseUp: function (event) { _onWindowMouseUp: function (event) {
this.vsbApi.evt_mouseup(event);
this.hsbApi.evt_mouseup(event);
// Shapes // Shapes
var coord = this._getCoordinates(event); var coord = this._getCoordinates(event);
if ( this.isGraphicObjectMode ) { if ( this.isGraphicObjectMode ) {
......
...@@ -1458,6 +1458,9 @@ function CEditorPage(api) ...@@ -1458,6 +1458,9 @@ function CEditorPage(api)
} }
this.onMouseUp = function(e, bIsWindow) this.onMouseUp = function(e, bIsWindow)
{ {
oThis.m_oScrollVerApi.evt_mouseup(e);
oThis.m_oScrollHor.evt_mouseup(e);
if (false === oThis.m_oApi.bInit_word_control) if (false === oThis.m_oApi.bInit_word_control)
return; return;
//if (true == global_mouseEvent.IsLocked) //if (true == global_mouseEvent.IsLocked)
......
...@@ -1649,6 +1649,9 @@ function CEditorPage(api) ...@@ -1649,6 +1649,9 @@ function CEditorPage(api)
} }
this.onMouseUp = function(e, bIsWindow) this.onMouseUp = function(e, bIsWindow)
{ {
oThis.m_oScrollVerApi.evt_mouseup(e);
oThis.m_oScrollHor.evt_mouseup(e);
if (false === oThis.m_oApi.bInit_word_control) if (false === oThis.m_oApi.bInit_word_control)
return; return;
//if (true == global_mouseEvent.IsLocked) //if (true == global_mouseEvent.IsLocked)
......
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