Commit 0b0aace3 authored by Alexander.Trofimov's avatar Alexander.Trofimov

add method asc_autoFitColumnWidth for bug 32196

parent 462844be
......@@ -2096,6 +2096,10 @@ var editor;
this.wb.getWorksheet().changeWorksheet("hideCols");
};
spreadsheet_api.prototype.asc_autoFitColumnWidth = function() {
this.wb.getWorksheet().autoFitColumnWidth();
};
spreadsheet_api.prototype.asc_getRowHeight = function() {
var ws = this.wb.getWorksheet();
return ws.getSelectedRowHeight();
......@@ -3337,6 +3341,7 @@ var editor;
prot["asc_setColumnWidth"] = prot.asc_setColumnWidth;
prot["asc_showColumns"] = prot.asc_showColumns;
prot["asc_hideColumns"] = prot.asc_hideColumns;
prot["asc_autoFitColumnWidth"] = prot.asc_autoFitColumnWidth;
prot["asc_getRowHeight"] = prot.asc_getRowHeight;
prot["asc_setRowHeight"] = prot.asc_setRowHeight;
prot["asc_showRows"] = prot.asc_showRows;
......
......@@ -1234,7 +1234,7 @@
var ct = ws.getCursorTypeFromXY(x, y, this.controller.settings.isViewerMode);
if (ct.target === c_oTargetType.ColumnResize || ct.target === c_oTargetType.RowResize) {
ct.target === c_oTargetType.ColumnResize ? ws.optimizeColWidth(ct.col) : ws.optimizeRowHeight(ct.row);
ct.target === c_oTargetType.ColumnResize ? ws.autoFitColumnWidth(ct.col, ct.col) : ws.autoFitRowHeight(ct.row, ct.row);
asc_applyFunction(callback);
} else {
if (ct.col >= 0 && ct.row >= 0) {
......
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