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

Поправил отрисовку для выбора диапазонов на другом листе. Клиповать нужно раньше.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68921 954022d7-b5bf-4e40-9824-e11837661b57
parent 68638eec
...@@ -3647,15 +3647,22 @@ ...@@ -3647,15 +3647,22 @@
* Рисует выделение вокруг ячеек * Рисует выделение вокруг ячеек
* @param {Asc.Range} [range] * @param {Asc.Range} [range]
*/ */
WorksheetView.prototype._drawSelection = function ( range ) { WorksheetView.prototype._drawSelection = function(range) {
if ( window['IS_NATIVE_EDITOR'] ) { if (window['IS_NATIVE_EDITOR']) {
return; return;
} }
// set clipping rect to cells area
var ctx = this.overlayCtx;
ctx.save().beginPath()
.rect(this.cellsLeft, this.cellsTop, ctx.getWidth() - this.cellsLeft, ctx.getHeight() - this.cellsTop)
.clip();
if (!this.isSelectionDialogMode) { if (!this.isSelectionDialogMode) {
this._drawCollaborativeElements(); this._drawCollaborativeElements();
} }
if ((this.isSelectionDialogMode || this.isFormulaEditMode) && !this.handlers.trigger('isActive')) { var isOtherSelectionMode = this.isSelectionDialogMode || this.isFormulaEditMode;
if (isOtherSelectionMode && !this.handlers.trigger('isActive')) {
if (this.isSelectionDialogMode) { if (this.isSelectionDialogMode) {
this._drawSelectRange(this.activeRange.clone(true)); this._drawSelectRange(this.activeRange.clone(true));
} else if (this.isFormulaEditMode) { } else if (this.isFormulaEditMode) {
...@@ -3664,6 +3671,13 @@ ...@@ -3664,6 +3671,13 @@
} else { } else {
this._drawSelectionRange(range); this._drawSelectionRange(range);
} }
// restore canvas' original clipping range
ctx.restore();
if (!isOtherSelectionMode) {
this._drawActiveHeaders();
}
}; };
WorksheetView.prototype._drawSelectionRange = function ( range, isFrozen ) { WorksheetView.prototype._drawSelectionRange = function ( range, isFrozen ) {
...@@ -3783,12 +3797,6 @@ ...@@ -3783,12 +3797,6 @@
var drawTopFillHandle; var drawTopFillHandle;
var drawBottomFillHandle; var drawBottomFillHandle;
// set clipping rect to cells area
ctx.save()
.beginPath()
.rect( this.cellsLeft, this.cellsTop, ctx.getWidth() - this.cellsLeft, ctx.getHeight() - this.cellsTop )
.clip();
// draw frame around cells range // draw frame around cells range
l = drawLeftSide ? -this.width_1px : 0; l = drawLeftSide ? -this.width_1px : 0;
r = drawRightSide ? this.width_1px : 0; r = drawRightSide ? this.width_1px : 0;
...@@ -4051,13 +4059,6 @@ ...@@ -4051,13 +4059,6 @@
} }
ctx.stroke(); ctx.stroke();
} }
// restore canvas' original clipping range
ctx.restore();
if ( !isFrozen ) {
this._drawActiveHeaders();
}
}; };
WorksheetView.prototype._drawFormatPainterRange = function () { WorksheetView.prototype._drawFormatPainterRange = function () {
......
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