Commit f2a2c5f2 authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete align to string

delete string to align
parent f7df9be0
...@@ -2949,12 +2949,11 @@ var editor; ...@@ -2949,12 +2949,11 @@ var editor;
}; };
spreadsheet_api.prototype.asc_setCellAlign = function(align) { spreadsheet_api.prototype.asc_setCellAlign = function(align) {
var ha = AscCommonExcel.horizontalAlignFromString(align);
var ws = this.wb.getWorksheet(); var ws = this.wb.getWorksheet();
if (ws.objectRender.selectedGraphicObjectsExists() && ws.objectRender.controller.setCellAlign) { if (ws.objectRender.selectedGraphicObjectsExists() && ws.objectRender.controller.setCellAlign) {
ws.objectRender.controller.setCellAlign(ha); ws.objectRender.controller.setCellAlign(align);
} else { } else {
this.wb.getWorksheet().setSelectionInfo("a", ha); this.wb.getWorksheet().setSelectionInfo("a", align);
this.wb.restoreFocus(); this.wb.restoreFocus();
} }
}; };
......
...@@ -71,27 +71,6 @@ ...@@ -71,27 +71,6 @@
}; };
function horizontalAlignFromString(val) {
var ha = null;
switch (val) {
case "left": ha = AscCommon.align_Left;break;
case "right": ha = AscCommon.align_Right;break;
case "center": ha = AscCommon.align_Center;break;
case "justify": ha = AscCommon.align_Justify;break;
}
return ha;
}
function horizontalAlignToString(val) {
var ha = "none";
switch (val) {
case AscCommon.align_Left: ha = "left";break;
case AscCommon.align_Right: ha = "right";break;
case AscCommon.align_Center: ha = "center";break;
case AscCommon.align_Justify: ha = "justify";break;
}
return ha;
}
function applyFunction(callback) { function applyFunction(callback) {
if (kFunctionL === typeof callback) { if (kFunctionL === typeof callback) {
callback.apply(null, Array.prototype.slice.call(arguments, 1)); callback.apply(null, Array.prototype.slice.call(arguments, 1));
...@@ -2331,8 +2310,6 @@ ...@@ -2331,8 +2310,6 @@
window['AscCommonExcel'] = window['AscCommonExcel'] || {}; window['AscCommonExcel'] = window['AscCommonExcel'] || {};
window["AscCommonExcel"].recalcType = recalcType; window["AscCommonExcel"].recalcType = recalcType;
window["AscCommonExcel"].applyFunction = applyFunction; window["AscCommonExcel"].applyFunction = applyFunction;
window["AscCommonExcel"].horizontalAlignFromString = horizontalAlignFromString;
window["AscCommonExcel"].horizontalAlignToString = horizontalAlignToString;
window["Asc"].typeOf = typeOf; window["Asc"].typeOf = typeOf;
window["Asc"].lastIndexOf = lastIndexOf; window["Asc"].lastIndexOf = lastIndexOf;
window["Asc"].search = search; window["Asc"].search = search;
......
...@@ -6799,7 +6799,7 @@ ...@@ -6799,7 +6799,7 @@
cell_info.text = c.getValueForEdit(); cell_info.text = c.getValueForEdit();
cell_info.halign = AscCommonExcel.horizontalAlignToString(align.getAlignHorizontal()); cell_info.halign = align.getAlignHorizontal();
cell_info.valign = align.getAlignVertical(); cell_info.valign = align.getAlignVertical();
var tablePartsOptions = selectionRange.isSingleRange() ? var tablePartsOptions = selectionRange.isSingleRange() ?
...@@ -7005,7 +7005,7 @@ ...@@ -7005,7 +7005,7 @@
} }
objectInfo.halign = AscCommonExcel.horizontalAlignToString(horAlign); objectInfo.halign = horAlign;
objectInfo.valign = vertAlign; objectInfo.valign = vertAlign;
objectInfo.angle = angle; objectInfo.angle = angle;
......
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