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 ) {
this.moveble = false;
this.lock = false;
this.scrollTimeout = null;
this.StartMousePosition = {x:0, y:0};
this.EndMousePosition = {x:0, y:0};
......@@ -1122,6 +1123,8 @@ ScrollObject.prototype = {
evt_mouseup:function ( e ) {
var evt = e || windows.event;
var mousePos = this.that.getMousePosition( evt );
this.that.scrollTimeout && clearTimeout( this.that.scrollTimeout );
this.that.scrollTimeout = null;
if ( !this.that.scrollerMouseDown ) {
if ( this.that.settings.showArrows && this.that._MouseHoverOnArrowDown( mousePos ) ) {
this.that.handleEvents( "onmouseup", evt );
......@@ -1178,7 +1181,6 @@ ScrollObject.prototype = {
direction = mousePos.y - this.that.scroller.y - this.that.scroller.h / 2,
step = this.that.paneHeight * this.that.settings.scrollPagePercent,
verticalDragPosition = this.that.scroller.y,
scrollTimeout,
isFirst = true,
doScroll = function () {
_tmp.that.lock = true;
......@@ -1204,12 +1206,12 @@ ScrollObject.prototype = {
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;
},
cancelClick = function () {
scrollTimeout && clearTimeout( scrollTimeout );
scrollTimeout = null;
_tmp.that.scrollTimeout && clearTimeout( _tmp.that.scrollTimeout );
_tmp.that.scrollTimeout = null;
_tmp.that.unbind( "mouseup.main", cancelClick );
_tmp.that.lock = false;
};
......@@ -1221,7 +1223,6 @@ ScrollObject.prototype = {
direction = mousePos.x - this.that.scroller.x - this.that.scroller.w / 2,
step = this.that.paneWidth * this.that.settings.scrollPagePercent,
horizontalDragPosition = this.that.scroller.x,
scrollTimeout,
isFirst = true,
doScroll = function () {
_tmp.that.lock = true;
......@@ -1247,12 +1248,12 @@ ScrollObject.prototype = {
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;
},
cancelClick = function () {
scrollTimeout && clearTimeout( scrollTimeout );
scrollTimeout = null;
_tmp.that.scrollTimeout && clearTimeout( _tmp.that.scrollTimeout );
_tmp.that.scrollTimeout = null;
_tmp.that.unbind( "mouseup.main", cancelClick );
_tmp.that.lock = false;
};
......
......@@ -2449,7 +2449,7 @@ cFormulaFunction.Statistical = {
r.getInfo = function () {
return {
name:this.name,
args:"( number-successes , number-trials , success-probability )"
args:"( number-failures , number-successes , success-probability )"
};
}
return r;
......@@ -2924,7 +2924,7 @@ cFormulaFunction.Statistical = {
r.getInfo = function () {
return {
name:this.name,
args:"( argument-list )"
args:"( array , x [ , significance ] )"
};
}
return r;
......
......@@ -978,7 +978,9 @@
/** @param event {jQuery.Event} */
_onWindowMouseUp: function (event) {
this.vsbApi.evt_mouseup(event);
this.hsbApi.evt_mouseup(event);
// Shapes
var coord = this._getCoordinates(event);
if ( this.isGraphicObjectMode ) {
......
......@@ -1458,6 +1458,9 @@ function CEditorPage(api)
}
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)
return;
//if (true == global_mouseEvent.IsLocked)
......
......@@ -1649,6 +1649,9 @@ function CEditorPage(api)
}
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)
return;
//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