Commit 92ad517f authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Переделал отрисовку и добавление закрепленных областей.

asc_freezePane с параметром c_oAscFreezePane
Переделал хранение в истории для закрепленных областей.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55181 954022d7-b5bf-4e40-9824-e11837661b57
parent b8c4234d
......@@ -2674,33 +2674,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
asyncImageEndLoadedBackground: function() {
},
// Frozen pane
asc_clearFrozenCell: function() {
if ( this.wb ) {
var ws = this.wb.getWorksheet();
ws.clearFrozenCell();
}
},
asc_setSelectedFrozenCell: function() {
if ( this.wb ) {
var ws = this.wb.getWorksheet();
ws.setSelectedFrozenCell();
}
},
asc_setFirstFrozenCol: function() {
if ( this.wb ) {
var ws = this.wb.getWorksheet();
ws.setFirstFrozenCol();
}
},
asc_setFirstFrozenRow: function() {
if ( this.wb ) {
var ws = this.wb.getWorksheet();
ws.setFirstFrozenRow();
asc_freezePane: function (type) {
if (this.wb) {
this.wb.getWorksheet().freezePane(type);
}
},
......@@ -3717,10 +3695,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
prot["asc_changeShapeImageFromFile"] = prot.asc_changeShapeImageFromFile;
// Frozen pane
prot["asc_clearFrozenCell"] = prot.asc_clearFrozenCell;
prot["asc_setSelectedFrozenCell"] = prot.asc_setSelectedFrozenCell;
prot["asc_setFirstFrozenCol"] = prot.asc_setFirstFrozenCol;
prot["asc_setFirstFrozenRow"] = prot.asc_setFirstFrozenRow;
prot["asc_freezePane"] = prot.asc_freezePane;
// Cell interface
prot["asc_getCellInfo"] = prot.asc_getCellInfo;
......
......@@ -476,6 +476,13 @@ var c_oAscPaneState = {
Frozen : "frozen",
FrozenSplit : "frozenSplit"
};
var c_oAscFreezePane = {
FreezeSheetPanes : 1,
FreezeTopRow : 2,
FreezeFirstColumn : 3,
FreezeClean : 4
};
var c_oAscCoAuthoringMeBorderColor = new window.CColor(22, 156, 0);
var c_oAscCoAuthoringOtherBorderColor = new window.CColor(238, 53, 37);
......
......@@ -922,19 +922,19 @@
break;
}
case "td_set_fixed_area":{
api.asc_setSelectedFrozenCell();
api.asc_freezePane(c_oAscFreezePane.FreezeSheetPanes);
break;
}
case "td_clean_fixed_area":{
api.asc_clearFrozenCell();
api.asc_freezePane(c_oAscFreezePane.FreezeClean);
break;
}
case "td_set_fixed_col":{
api.asc_setFirstFrozenCol();
api.asc_freezePane(c_oAscFreezePane.FreezeFirstColumn);
break;
}
case "td_set_fixed_row":{
api.asc_setFirstFrozenRow();
api.asc_freezePane(c_oAscFreezePane.FreezeTopRow);
break;
}
}
......
......@@ -37,9 +37,7 @@ var historyitem_Worksheet_RemoveCellFormula = 24;
var historyitem_Worksheet_ChangeMerge = 25;
var historyitem_Worksheet_ChangeHyperlink = 26;
// Frozen cell
var historyitem_Worksheet_AddFrozenCell = 30;
var historyitem_Worksheet_ChangeFrozenCell = 31;
var historyitem_Worksheet_RemoveFrozenCell = 32;
var historyitem_Worksheet_ChangeFrozenCell = 30;
var historyitem_RowCol_Fontname = 1;
var historyitem_RowCol_Fontsize = 2;
......
This diff is collapsed.
......@@ -1020,7 +1020,8 @@
var res = new asc_CPane();
res.state = this.state;
res.topLeftCell = this.topLeftCell;
res.topLeftFrozenCell = this.topLeftFrozenCell ? new CellAddress(this.topLeftFrozenCell.id) : null;
res.topLeftFrozenCell = this.topLeftFrozenCell ?
new CellAddress(this.topLeftFrozenCell.row, this.topLeftFrozenCell.col) : null;
return res;
};
asc_CPane.prototype.init = function() {
......
......@@ -714,9 +714,9 @@
if (isResizeModeMove) {
ws.objectRender.saveSizeDrawingObjects();
if (target.target === "colresize") {
ws.changeColumnWidth(target.col, x, target.mouseX);
ws.changeColumnWidth(target.col, x, target.mouseX);
} else if (target.target === "rowresize") {
ws.changeRowHeight(target.row, y, target.mouseY);
ws.changeRowHeight(target.row, y, target.mouseY);
}
ws.objectRender.updateSizeDrawingObjects();
ws.cellCommentator.updateCommentPosition();
......@@ -768,15 +768,13 @@
// Frozen anchor
WorkbookView.prototype._onMoveFrozenAnchorHandle = function (x, y, targetInfo) {
var ws = this.getWorksheet();
if ( ws )
ws._applyFrozenAnchor(x, y, targetInfo, true);
ws.drawFrozenGuides(x, y, targetInfo);
};
WorkbookView.prototype._onMoveFrozenAnchorHandleDone = function (x, y, targetInfo) {
// Закрепляем область
var ws = this.getWorksheet();
if ( ws )
ws._applyFrozenAnchor(x, y, targetInfo, false);
ws.applyFrozenAnchor(x, y, targetInfo);
};
WorkbookView.prototype._onAutoFiltersClick = function (idFilter) {
......
This diff is collapsed.
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