Commit 98a0030b authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49776 954022d7-b5bf-4e40-9824-e11837661b57
parent 0f4c5d46
......@@ -3132,6 +3132,30 @@ function DrawingObjects() {
var bRedraw = false;
var selection = worksheet.activeRange.normalize();
function isRangeInObject(range) {
var result = false;
if ( range ) {
var x1 = worksheet.getCellLeft(range.c1, 3);
var y1 = worksheet.getCellTop(range.r1, 3);
var x2 = worksheet.getCellLeft(range.c2 + 1, 3);
var y2 = worksheet.getCellTop(range.r1, 3);
var x3 = worksheet.getCellLeft(range.c2 + 1, 3);
var y3 = worksheet.getCellTop(range.r2 + 1, 3);
var x4 = worksheet.getCellLeft(range.c1, 3);
var y4 = worksheet.getCellTop(range.r2 + 1, 3);
result = (_this.controller.isPointInDrawingObjects(x1, y1) != null) ||
(_this.controller.isPointInDrawingObjects(x2, y2) != null) ||
(_this.controller.isPointInDrawingObjects(x3, y3) != null) ||
(_this.controller.isPointInDrawingObjects(x4, y4) != null);
}
return result;
}
if ( selection ) {
for ( var i = 0; i < aObjects.length; i++ ) {
var drawingObject = aObjects[i];
......@@ -3153,6 +3177,20 @@ function DrawingObjects() {
break;
}
}
// Проверяем по четырём точкам (x1, y1) (x2, y2) (x3, y3) (x4, y4)
if ( !bRedraw ) {
if (isRangeInObject(selection))
bRedraw = true;
else {
// Проверяем диапазоны диаграмм
for (var j = 0; j < worksheet.arrActiveChartsRanges.length; j++) {
if (isRangeInObject(selection)) {
bRedraw = true;
break;
}
}
}
}
}
if ( bRedraw ) {
shapeOverlayCtx.ClearMode = 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