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

рефакторинг

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53295 954022d7-b5bf-4e40-9824-e11837661b57
parent 0a1223a8
...@@ -1275,8 +1275,8 @@ ...@@ -1275,8 +1275,8 @@
width = width*(rowHeight/height); width = width*(rowHeight/height);
height = rowHeight; height = rowHeight;
} }
var x1 = (ws.cols[col].left + ws.cols[col].width - width - offsetX - 0.5)*ws.getZoom(); var x1 = ws.cols[col].left + ws.cols[col].width - width - offsetX - 0.5;
var y1 = (ws.rows[row].top + ws.rows[row].height - height - offsetY - 0.5)*ws.getZoom(); var y1 = ws.rows[row].top + ws.rows[row].height - height - offsetY - 0.5;
buttons[i].x = x1; buttons[i].x = x1;
buttons[i].y = y1; buttons[i].y = y1;
buttons[i].x1 = ws.cols[col].left - offsetX; buttons[i].x1 = ws.cols[col].left - offsetX;
...@@ -1304,7 +1304,7 @@ ...@@ -1304,7 +1304,7 @@
var filters; var filters;
if (currentFilter && currentFilter.FilterColumns) { if (currentFilter && currentFilter.FilterColumns) {
filters = currentFilter.FilterColumns; filters = currentFilter.FilterColumns;
for (var k= 0; k < filters.length; k++) { for (var k = 0; k < filters.length; k++) {
//для мерженных головных ячеек //для мерженных головных ячеек
var colId = filters[k].ColId; var colId = filters[k].ColId;
if (filters[k].ShowButton == false && currentFilter.result) { if (filters[k].ShowButton == false && currentFilter.result) {
...@@ -1338,10 +1338,6 @@ ...@@ -1338,10 +1338,6 @@
} }
} }
if(isSetFilter)
activeButtonFilter[activeButtonFilter.length] = buttons[i];
else
passiveButtonFilter[passiveButtonFilter.length] = buttons[i];
var sortState = undefined; var sortState = undefined;
if(curFilForSort.SortState) { if(curFilForSort.SortState) {
if(curFilForSort.SortState.SortConditions && curFilForSort.SortState.SortConditions.length != 0 && curFilForSort.SortState.SortConditions[0].Ref.split(':')[0] == buttons[i].id) if(curFilForSort.SortState.SortConditions && curFilForSort.SortState.SortConditions.length != 0 && curFilForSort.SortState.SortConditions[0].Ref.split(':')[0] == buttons[i].id)
...@@ -1357,13 +1353,6 @@ ...@@ -1357,13 +1353,6 @@
this._drawButton(x1,y1,filOptions); this._drawButton(x1,y1,filOptions);
} }
} }
//фильтры ставим в порядок добавления
for (k = 0; k < passiveButtonFilter.length + activeButtonFilter.length; k++) {
if(activeButtonFilter[k])
buttons[k] = activeButtonFilter[k];
else
buttons[k] = passiveButtonFilter[k - activeButtonFilter.length];
}
} }
}, },
...@@ -3080,7 +3069,7 @@ ...@@ -3080,7 +3069,7 @@
ws._trigger("setAutoFiltersDialog", autoFilterObject); ws._trigger("setAutoFiltersDialog", autoFilterObject);
}, },
//отрисовка кнопки фильтра //отрисовка кнопки фильтра
_drawButton: function(x1,y1,options) _drawButton: function(x1, y1, options)
{ {
var ws = this.worksheet; var ws = this.worksheet;
var isSet = options.isSetFilter; var isSet = options.isSetFilter;
...@@ -3124,9 +3113,6 @@ ...@@ -3124,9 +3113,6 @@
height = rowHeight; height = rowHeight;
} }
//квадрат кнопки рисуем //квадрат кнопки рисуем
var zoom = ws.getZoom();
var x1 = x1/zoom;
var y1 = y1/zoom;
ws.drawingCtx ws.drawingCtx
.setFillStyle(ws.settings.cells.defaultState.background) .setFillStyle(ws.settings.cells.defaultState.background)
.setLineWidth(1) .setLineWidth(1)
......
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