Commit 083854d7 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix error with border options

parent 94c570d7
......@@ -6644,6 +6644,7 @@ function offline_calculate_complete_range(x, y, w, h) {
function offline_set_translate(translate) {_s.translate = translate;}
function offline_apply_event(type,params) {
var _borderOptions = Asc.c_oAscBorderOptions;
var _stream = null;
var _return = undefined;
var _current = {pos: 0};
......@@ -7086,7 +7087,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border) {
borders[c_oAscBorderOptions.Left] = border;
borders[_borderOptions.Left] = border;
}
break;
}
......@@ -7096,7 +7097,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.Top] = border;
borders[_borderOptions.Top] = border;
}
break;
}
......@@ -7106,7 +7107,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.Right] = border;
borders[_borderOptions.Right] = border;
}
break;
}
......@@ -7116,7 +7117,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.Bottom] = border;
borders[_borderOptions.Bottom] = border;
}
break;
}
......@@ -7126,7 +7127,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.DiagD] = border;
borders[_borderOptions.DiagD] = border;
}
break;
}
......@@ -7136,7 +7137,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.DiagU] = border;
borders[_borderOptions.DiagU] = border;
}
break;
}
......@@ -7146,7 +7147,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.InnerV] = border;
borders[_borderOptions.InnerV] = border;
}
break;
}
......@@ -7156,7 +7157,7 @@ function offline_apply_event(type,params) {
if (!borders) borders = [];
border = asc_ReadCBorder(params, _current);
if (border && borders) {
borders[c_oAscBorderOptions.InnerH] = border;
borders[_borderOptions.InnerH] = border;
}
break;
}
......
......@@ -18,6 +18,7 @@
* -----------------------------------------------------------------------------
*/
var asc = window["Asc"];
var borderOptions = asc.c_oAscBorderOptions;
var asc_applyFunction = asc.applyFunction;
var asc_calcnpt = asc.calcNearestPt;
var asc_getcvt = asc.getCvtRatio;
......@@ -8929,17 +8930,17 @@
}
res = new Border();
// Diagonal
res.d = makeBorder( val[c_oAscBorderOptions.DiagD] || val[c_oAscBorderOptions.DiagU] );
res.dd = val[c_oAscBorderOptions.DiagD] ? true : false;
res.du = val[c_oAscBorderOptions.DiagU] ? true : false;
res.d = makeBorder( val[borderOptions.DiagD] || val[borderOptions.DiagU] );
res.dd = val[borderOptions.DiagD] ? true : false;
res.du = val[borderOptions.DiagU] ? true : false;
// Vertical
res.l = makeBorder( val[c_oAscBorderOptions.Left] );
res.iv = makeBorder( val[c_oAscBorderOptions.InnerV] );
res.r = makeBorder( val[c_oAscBorderOptions.Right] );
res.l = makeBorder( val[borderOptions.Left] );
res.iv = makeBorder( val[borderOptions.InnerV] );
res.r = makeBorder( val[borderOptions.Right] );
// Horizontal
res.t = makeBorder( val[c_oAscBorderOptions.Top] );
res.ih = makeBorder( val[c_oAscBorderOptions.InnerH] );
res.b = makeBorder( val[c_oAscBorderOptions.Bottom] );
res.t = makeBorder( val[borderOptions.Top] );
res.ih = makeBorder( val[borderOptions.InnerH] );
res.b = makeBorder( val[borderOptions.Bottom] );
// Change border
range.setBorder( res );
break;
......
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