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