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

delete fillColor. Add inner background in formula cells selection

parent 5dd894b5
......@@ -3554,8 +3554,7 @@
var range = args[0];
var isDashLine = args[1];
var strokeColor = args[2];
var fillColor = args[3];
var isAllRange = args[4];
var isAllRange = args[3];
var colorN = this.settings.activeCellBorderColor2;
var ctx = this.overlayCtx;
var c = this.cols;
......@@ -3598,12 +3597,14 @@
var y1 = r[oIntersection.r1].top - offsetY;
var y2 = r[oIntersection.r2].top + r[oIntersection.r2].height - offsetY;
ctx.setLineWidth(isDashLine ? 1 : 2).setStrokeStyle(strokeColor);
/*2px для селекта ячеек в формулах*/
if (fillColor) {
ctx.setFillStyle(fillColor);
if (!isDashLine) {
var fillColor = strokeColor.Copy();
fillColor.a = 0.1;
ctx.setFillStyle(fillColor).fillRect(x1, y1, x2 - x1, y2 - y1);
}
ctx.setLineWidth(isDashLine ? 1 : 2).setStrokeStyle(strokeColor);
ctx.beginPath();
if (drawTopSide && !firstRow) {
fHorLine.apply(ctx, [x1 - !isDashLine * width_2px, y1, x2 + !isDashLine * width_1px]);
......@@ -4111,13 +4112,12 @@
};
WorksheetView.prototype._drawFormatPainterRange = function () {
var strokeColor = new CColor(0, 0, 0);
this._drawElements(this._drawSelectionElement, this.copyActiveRange, true, strokeColor);
this._drawElements(this._drawSelectionElement, this.copyActiveRange, true, new CColor(0, 0, 0));
};
WorksheetView.prototype._drawFormulaRanges = function (arrRanges) {
var i, length = AscCommonExcel.c_oAscFormulaRangeBorderColor.length;
var strokeColor, fillColor, colorIndex, uniqueColorIndex = 0, tmpColors = [];
var strokeColor, colorIndex, uniqueColorIndex = 0, tmpColors = [];
for (i = 0; i < arrRanges.length; ++i) {
var oFormulaRange = arrRanges[i].clone(true);
if (arrRanges[i].isName) {
......@@ -4129,8 +4129,8 @@
}
tmpColors.push(colorIndex);
strokeColor = fillColor = AscCommonExcel.c_oAscFormulaRangeBorderColor[colorIndex % length];
this._drawElements(this._drawSelectionElement, oFormulaRange, false, strokeColor, fillColor);
strokeColor = AscCommonExcel.c_oAscFormulaRangeBorderColor[colorIndex % length];
this._drawElements(this._drawSelectionElement, oFormulaRange, false, strokeColor);
}
};
......@@ -4154,7 +4154,7 @@
var isAllRange = true, strokeColor = (Asc.c_oAscMouseMoveLockedObjectType.TableProperties ===
nLockAllType) ? AscCommonExcel.c_oAscCoAuthoringLockTablePropertiesBorderColor :
AscCommonExcel.c_oAscCoAuthoringOtherBorderColor, oAllRange = new asc_Range(0, 0, gc_nMaxCol0, gc_nMaxRow0);
this._drawElements(this._drawSelectionElement, oAllRange, true, strokeColor, null, isAllRange);
this._drawElements(this._drawSelectionElement, oAllRange, true, strokeColor, isAllRange);
}
};
......
......@@ -3569,20 +3569,20 @@ function DrawingObjects() {
if(!drawing.bbox || drawing.bbox.worksheet !== worksheet.model)
return;
var stroke_color, fill_color;
var stroke_color;
if(drawing.bbox.serBBox)
{
stroke_color = fill_color = new AscCommon.CColor(0, 128, 0);
stroke_color = new AscCommon.CColor(0, 128, 0);
worksheet._drawElements(worksheet._drawSelectionElement,
asc.Range(drawing.bbox.serBBox.c1, drawing.bbox.serBBox.r1, drawing.bbox.serBBox.c2,
drawing.bbox.serBBox.r2, true), false, stroke_color, fill_color);
drawing.bbox.serBBox.r2, true), false, stroke_color);
}
if(drawing.bbox.catBBox)
{
stroke_color = fill_color = new AscCommon.CColor(153, 0, 204);
stroke_color = new AscCommon.CColor(153, 0, 204);
worksheet._drawElements(worksheet._drawSelectionElement,
asc.Range(drawing.bbox.catBBox.c1, drawing.bbox.catBBox.r1, drawing.bbox.catBBox.c2,
drawing.bbox.catBBox.r2, true), false, stroke_color, fill_color);
drawing.bbox.catBBox.r2, true), false, stroke_color);
}
var BB = drawing.bbox.seriesBBox;
var range = asc.Range(BB.c1, BB.r1, BB.c2, BB.r2, true);
......
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