Commit 22223554 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

http://bugzserver/show_bug.cgi?id=25404 - Не открывается окно автофильтра при...

http://bugzserver/show_bug.cgi?id=25404 - Не открывается окно автофильтра при наличии закрепленной области на листе

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57318 954022d7-b5bf-4e40-9824-e11837661b57
parent 7febf6c8
...@@ -1137,7 +1137,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -1137,7 +1137,7 @@ var gUndoInsDelCellsFlag = true;
}, },
//попал ли курсор на кнопку фильтра //попал ли курсор на кнопку фильтра
checkCursor: function (x, y) { checkCursor: function (x, y, offsetX, offsetY, frozenObj) {
if (!this.allButtonAF) if (!this.allButtonAF)
return false; return false;
var ws = this.worksheet; var ws = this.worksheet;
...@@ -1145,6 +1145,13 @@ var gUndoInsDelCellsFlag = true; ...@@ -1145,6 +1145,13 @@ var gUndoInsDelCellsFlag = true;
var width = 11.25; var width = 11.25;
var height = 11.25; var height = 11.25;
var checkFrozenArea = this._checkClickFrozenArea(x, y, offsetX, offsetY, frozenObj);
if(checkFrozenArea)
{
x = checkFrozenArea.x;
y = checkFrozenArea.y;
};
var button; var button;
for (var i = 0; i < this.allButtonAF.length; i++) { for (var i = 0; i < this.allButtonAF.length; i++) {
button = this.allButtonAF[i]; button = this.allButtonAF[i];
...@@ -1598,6 +1605,33 @@ var gUndoInsDelCellsFlag = true; ...@@ -1598,6 +1605,33 @@ var gUndoInsDelCellsFlag = true;
History.TurnOff(); History.TurnOff();
}, },
_checkClickFrozenArea: function(x, y, offsetX, offsetY, frozenObj)
{
var ws = this.worksheet;
var frosenPosX = frozenObj && frozenObj.cFrozen != undefined && ws.cols[frozenObj.cFrozen] ? ws.cols[frozenObj.cFrozen].left : null;
var frosenPosY = frozenObj && frozenObj.rFrozen != undefined && ws.rows[frozenObj.rFrozen] ? ws.rows[frozenObj.rFrozen].top : null;
var result;
if(frosenPosX != null && frosenPosY != null && x < frosenPosX && y < frosenPosY)
{
result = {x: x, y: y};
}
else if(frosenPosX != null && x < frosenPosX)
{
result = {x: x, y: y + offsetY};
}
else if(frosenPosY != null && y < frosenPosY)
{
result = {x: x + offsetX, y: y};
}
else
{
result = {x: x + offsetX, y: y + offsetY};
}
return result;
},
_isEmptyButtons: function(ar) _isEmptyButtons: function(ar)
{ {
if(!this.allButtonAF) if(!this.allButtonAF)
......
...@@ -5810,7 +5810,7 @@ ...@@ -5810,7 +5810,7 @@
var xWithOffset = x + offsetX; var xWithOffset = x + offsetX;
var yWithOffset = y + offsetY; var yWithOffset = y + offsetY;
var autoFilterInfo = this.autoFilters.checkCursor(xWithOffset, yWithOffset); var autoFilterInfo = this.autoFilters.checkCursor(x, y, offsetX, offsetY, {cFrozen: cFrozen, rFrozen: rFrozen});
if (autoFilterInfo && !isViewerMode) if (autoFilterInfo && !isViewerMode)
return {cursor: kCurAutoFilter, target: c_oTargetType.FilterObject, col: -1, row: -1, idFilter: autoFilterInfo.id}; return {cursor: kCurAutoFilter, target: c_oTargetType.FilterObject, col: -1, row: -1, idFilter: autoFilterInfo.id};
......
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