Commit 373d7169 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил asc_isFreezePane (получить есть ли закрепленные области)

Поправил asc_freezePane (теперь она без параметра, сами решаем делать панель или нет)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55865 954022d7-b5bf-4e40-9824-e11837661b57
parent d0368feb
...@@ -2718,10 +2718,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2718,10 +2718,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}, },
// Frozen pane // Frozen pane
asc_freezePane: function (type) { asc_freezePane: function () {
if (this.wb) { this.wb.getWorksheet().freezePane();
this.wb.getWorksheet().freezePane(type); },
}
asc_isFreezePane: function () {
return null !== this.wb.getWorksheet().getFrozenCell();
}, },
// Cell interface // Cell interface
...@@ -3739,6 +3741,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -3739,6 +3741,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
// Frozen pane // Frozen pane
prot["asc_freezePane"] = prot.asc_freezePane; prot["asc_freezePane"] = prot.asc_freezePane;
prot["asc_isFreezePane"] = prot.asc_isFreezePane;
// Cell interface // Cell interface
prot["asc_getCellInfo"] = prot.asc_getCellInfo; prot["asc_getCellInfo"] = prot.asc_getCellInfo;
......
...@@ -463,13 +463,6 @@ var c_oAscPaneState = { ...@@ -463,13 +463,6 @@ var c_oAscPaneState = {
FrozenSplit : "frozenSplit" FrozenSplit : "frozenSplit"
}; };
var c_oAscFreezePane = {
FreezeSheetPanes : 1,
FreezeTopRow : 2,
FreezeFirstColumn : 3,
FreezeClean : 4
};
var c_oAscFindLookIn = { var c_oAscFindLookIn = {
Formulas : 1, Formulas : 1,
Value : 2, Value : 2,
......
...@@ -918,19 +918,19 @@ ...@@ -918,19 +918,19 @@
break; break;
} }
case "td_set_fixed_area":{ case "td_set_fixed_area":{
api.asc_freezePane(c_oAscFreezePane.FreezeSheetPanes); api.asc_freezePane();
break; break;
} }
case "td_clean_fixed_area":{ case "td_clean_fixed_area":{
api.asc_freezePane(c_oAscFreezePane.FreezeClean); api.asc_freezePane();
break; break;
} }
case "td_set_fixed_col":{ case "td_set_fixed_col":{
api.asc_freezePane(c_oAscFreezePane.FreezeFirstColumn); api.asc_freezePane();
break; break;
} }
case "td_set_fixed_row":{ case "td_set_fixed_row":{
api.asc_freezePane(c_oAscFreezePane.FreezeTopRow); api.asc_freezePane();
break; break;
} }
} }
......
...@@ -3144,29 +3144,18 @@ ...@@ -3144,29 +3144,18 @@
/** Для api закрепленных областей */ /** Для api закрепленных областей */
WorksheetView.prototype.freezePane = function (type) { WorksheetView.prototype.freezePane = function () {
var t = this; var t = this;
var ar = this.activeRange.clone();
var onChangeFreezePane = function (isSuccess) { var onChangeFreezePane = function (isSuccess) {
if (false === isSuccess) if (false === isSuccess)
return; return;
var col, row; var col, row;
switch(type) { if (null !== t.topLeftFrozenCell)
case c_oAscFreezePane.FreezeSheetPanes: col = row = 0;
col = t.getSelectedColumnIndex(); else {
row = t.getSelectedRowIndex(); col = ar.startCol;
break; row = ar.startRow;
case c_oAscFreezePane.FreezeFirstColumn:
col = 1;
row = 0;
break;
case c_oAscFreezePane.FreezeTopRow:
col = 0;
row = 1;
break;
case c_oAscFreezePane.FreezeClean:
col = 0;
row = 0;
break;
} }
t._updateFreezePane(col, row); t._updateFreezePane(col, row);
}; };
......
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