Commit d955717a authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Поправил баг http://bugzserver/show_bug.cgi?id=24458 (отрисовка рамки выделения)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57763 954022d7-b5bf-4e40-9824-e11837661b57
parent f50d6225
......@@ -769,8 +769,9 @@
};
DrawingContext.prototype.strokeRect = function (x, y, w, h) {
var isEven = 0 !== this.ctx.lineWidth % 2 ? 0.5 : 0;
var r = this._calcRect(x, y, w, h);
this.ctx.strokeRect(r.x+0.5, r.y+0.5, r.w-1, r.h-1);
this.ctx.strokeRect(r.x + isEven, r.y + isEven, r.w, r.h);
return this;
};
......
......@@ -72,11 +72,12 @@
},
padding: 2/*px horizontal padding*/
};
this.activeCellBorderColor = new CColor(105, 119, 62, 1);
this.activeCellBorderColor = new CColor(105, 119, 62);
this.activeCellBorderColor2 = new CColor(255, 255, 255);
this.activeCellBackground = new CColor(157, 185, 85, 0.2);
// Цвет заливки границы выделения области автозаполнения
this.fillHandleBorderColorSelect = new CColor(255, 255, 255, 1);
this.fillHandleBorderColorSelect = new CColor(255, 255, 255);
// Цвет закрепленных областей
this.frozenColor = new CColor(105, 119, 62, 1);
......
......@@ -3537,6 +3537,13 @@
ctx.setFillStyle( opt.activeCellBackground )
.fillRect(lRect, tRect, rRect - lRect, bRect - tRect);
var lRect2 = x1 + (drawLeftSide ? this.width_2px : this.width_1px),
rRect2 = x2 - (drawRightSide ? this.width_2px : 0),
tRect2 = y1 + (drawTopSide ? this.height_1px : 0),
bRect2 = y2 - (drawBottomSide ? this.width_2px : 0);
ctx.setStrokeStyle(opt.activeCellBorderColor2).setLineWidth(1).beginPath()
.strokeRect(lRect2, tRect2, rRect2 - lRect2, bRect2 - tRect2);
var firstCell = (!this.isSelectionDialogMode) ? this.activeRange : this.copyActiveRange;
cr = this.model.getMergedByCell(firstCell.startRow, firstCell.startCol);
// Получаем активную ячейку в выделении
......@@ -3559,7 +3566,12 @@
this.fillHandleT = this.rows[cr.r1].top - offsetY + this.rows[cr.r1].height - this.height_1px - this.height_2px;
this.fillHandleB = this.fillHandleT + fillHandleHeight;
ctx.setFillStyle (opt.activeCellBorderColor).fillRect(this.fillHandleL, this.fillHandleT, this.fillHandleR - this.fillHandleL, this.fillHandleB - this.fillHandleT);
ctx.setFillStyle(opt.activeCellBorderColor).fillRect(this.fillHandleL, this.fillHandleT, this.fillHandleR - this.fillHandleL, this.fillHandleB - this.fillHandleT);
ctx.setStrokeStyle(opt.activeCellBorderColor2).setLineWidth(1).beginPath();
ctx.lineHorPrevPx(this.fillHandleL, this.fillHandleT, this.fillHandleR);
ctx.lineVerPrevPx(this.fillHandleL, this.fillHandleT, this.fillHandleB);
ctx.stroke();
}
}
}
......
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