Commit 1c8396c5 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Исправлены баги с селектом(#20307)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49772 954022d7-b5bf-4e40-9824-e11837661b57
parent a38fcf86
...@@ -3130,15 +3130,24 @@ function DrawingObjects() { ...@@ -3130,15 +3130,24 @@ function DrawingObjects() {
_this.raiseLayerDrawingObjects = function() { _this.raiseLayerDrawingObjects = function() {
var bRedraw = false; var bRedraw = false;
var selection = worksheet.activeRange; var selection = worksheet.activeRange.normalize();
if ( selection ) { if ( selection ) {
for ( var i = 0; i < aObjects.length; i++ ) { for ( var i = 0; i < aObjects.length; i++ ) {
var drawingObject = aObjects[i]; var drawingObject = aObjects[i];
// Объекты не пересекаются // Объекты не пересекаются
if ( (selection.c2 < drawingObject.from.col) || (selection.c1 > drawingObject.to.col) || (selection.r2 < drawingObject.from.row) || (selection.r1 > drawingObject.to.row) ) if ( (selection.c2 < drawingObject.from.col) || (selection.c1 > drawingObject.to.col) || (selection.r2 < drawingObject.from.row) || (selection.r1 > drawingObject.to.row) ) {
// Проверяем диапазоны диаграмм
for (var j = 0; j < worksheet.arrActiveChartsRanges.length; j++) {
var range = worksheet.arrActiveChartsRanges[j];
if ( (range.c2 < drawingObject.from.col) || (range.c1 > drawingObject.to.col) || (range.r2 < drawingObject.from.row) || (range.r1 > drawingObject.to.row) ) {
bRedraw = true;
break;
}
}
continue; continue;
}
else { else {
bRedraw = true; bRedraw = true;
break; break;
...@@ -3146,21 +3155,12 @@ function DrawingObjects() { ...@@ -3146,21 +3155,12 @@ function DrawingObjects() {
} }
} }
if ( bRedraw ) { if ( bRedraw ) {
/*for ( var i = 0; i < aObjects.length; i++ ) {
var boundsChecker = _this.getBoundsChecker(aObjects[i]);
restoreSheetArea(boundsChecker);
}
for ( var i = 0; i < aObjects.length; i++ ) {
aObjects[i].graphicObject.draw(shapeCtx);
}*/
shapeOverlayCtx.ClearMode = true; shapeOverlayCtx.ClearMode = true;
for ( var i = 0; i < aObjects.length; i++ ) { for ( var i = 0; i < aObjects.length; i++ ) {
aObjects[i].graphicObject.draw(shapeOverlayCtx); aObjects[i].graphicObject.draw(shapeOverlayCtx);
} }
shapeOverlayCtx.ClearMode = false; shapeOverlayCtx.ClearMode = false;
} }
if ( aObjects.length ) if ( aObjects.length )
_this.drawWorksheetHeaders(); _this.drawWorksheetHeaders();
} }
...@@ -4434,6 +4434,7 @@ function DrawingObjects() { ...@@ -4434,6 +4434,7 @@ function DrawingObjects() {
return "rgb(" + r() + "," + r() + "," + r() + ")"; return "rgb(" + r() + "," + r() + "," + r() + ")";
} }
var bRaise = false;
for (var i = 0; i < aObjects.length; i++) { for (var i = 0; i < aObjects.length; i++) {
var drawingObject = aObjects[i].graphicObject; var drawingObject = aObjects[i].graphicObject;
...@@ -4488,8 +4489,11 @@ function DrawingObjects() { ...@@ -4488,8 +4489,11 @@ function DrawingObjects() {
worksheet.arrActiveChartsRanges.push(range); worksheet.arrActiveChartsRanges.push(range);
worksheet.isChartAreaEditMode = true; worksheet.isChartAreaEditMode = true;
worksheet._drawFormulaRange(worksheet.arrActiveChartsRanges); worksheet._drawFormulaRange(worksheet.arrActiveChartsRanges);
bRaise = true;
} }
} }
if ( bRaise )
_this.raiseLayerDrawingObjects();
} }
_this.unselectDrawingObjects = function() { _this.unselectDrawingObjects = 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