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