Commit d2d45ad4 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

правка бага 21539 - [Charts] Не активные маркеры масштабирования диаграммы,...

правка бага 21539 - [Charts] Не активные маркеры масштабирования диаграммы, если она вставлена в автофигуру

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50905 954022d7-b5bf-4e40-9824-e11837661b57
parent 829331e1
...@@ -1246,15 +1246,6 @@ CChartAsGroup.prototype = ...@@ -1246,15 +1246,6 @@ CChartAsGroup.prototype =
hitToHandle: function(x, y, radius) hitToHandle: function(x, y, radius)
{ {
var _radius;
if(!(typeof radius === "number"))
_radius = editor.WordControl.m_oDrawingDocument.GetMMPerDot(TRACK_CIRCLE_RADIUS);
else
{
_radius = radius;
}
if(typeof global_mouseEvent.KoefPixToMM === "number" && !isNaN(global_mouseEvent.KoefPixToMM))
_radius *= global_mouseEvent.KoefPixToMM;
var t_x, t_y; var t_x, t_y;
if(this.group != null) if(this.group != null)
...@@ -1268,9 +1259,43 @@ CChartAsGroup.prototype = ...@@ -1268,9 +1259,43 @@ CChartAsGroup.prototype =
t_x = x; t_x = x;
t_y = y; t_y = y;
} }
var result_x, result_y;
result_x = t_x;
result_y = t_y;
if(isRealObject(this.parent))
{
if(this.parent.Is_Inline())
{
if(this.parent.DocumentContent instanceof CDocumentContent)
{
var cur_doc_content = this.parent.DocumentContent;
while(cur_doc_content.Is_TableCellContent())
{
cur_doc_content = cur_doc_content.Parent.Row.Table.Parent;
}
if((cur_doc_content instanceof CDocumentContent && cur_doc_content.Parent instanceof WordShape))
{
var invert_matrix = cur_doc_content.Parent.invertTextMatrix;
result_x = invert_matrix.TransformPointX(t_x, t_y);
result_y = invert_matrix.TransformPointY(t_x, t_y);
}
}
}
}
var _radius;
if(!(typeof radius === "number"))
_radius = this.drawingDocument.GetMMPerDot(TRACK_CIRCLE_RADIUS);
else
_radius = radius;
if(typeof global_mouseEvent.KoefPixToMM === "number" && !isNaN(global_mouseEvent.KoefPixToMM))
_radius *= global_mouseEvent.KoefPixToMM;
this.calculateLeftTopPoint(); this.calculateLeftTopPoint();
var _temp_x = t_x - this.absXLT; var _temp_x = result_x - this.absXLT;
var _temp_y = t_y - this.absYLT; var _temp_y = result_y - this.absYLT;
var _sin = Math.sin(this.absRot); var _sin = Math.sin(this.absRot);
var _cos = Math.cos(this.absRot); var _cos = Math.cos(this.absRot);
...@@ -1279,6 +1304,10 @@ CChartAsGroup.prototype = ...@@ -1279,6 +1304,10 @@ CChartAsGroup.prototype =
var _relative_x = _temp_x*_cos + _temp_y*_sin; var _relative_x = _temp_x*_cos + _temp_y*_sin;
var _relative_y = -_temp_x*_sin + _temp_y*_cos; var _relative_y = -_temp_x*_sin + _temp_y*_cos;
if(this.absFlipH)
_relative_x = this.absExtX - _relative_x;
if(this.absFlipV)
_relative_y = this.absExtY - _relative_y;
var _dist_x, _dist_y; var _dist_x, _dist_y;
if(!this.checkLine()) if(!this.checkLine())
...@@ -1343,6 +1372,14 @@ CChartAsGroup.prototype = ...@@ -1343,6 +1372,14 @@ CChartAsGroup.prototype =
return {hit: true, handleRotate: false, handleNum: 5}; return {hit: true, handleRotate: false, handleNum: 5};
} }
} }
_dist_x = _relative_x - _horizontal_center;
_dist_y = _relative_y + this.drawingDocument.GetMMPerDot(TRACK_DISTANCE_ROTATE);
if(Math.sqrt(_dist_x*_dist_x + _dist_y*_dist_y) < _radius)
{
return {hit: true, handleRotate: true, handleNum: 8};
}
} }
else else
{ {
......
...@@ -555,6 +555,36 @@ WordShape.prototype = ...@@ -555,6 +555,36 @@ WordShape.prototype =
for(var i = 0; i < arr_graphic_objects.length; ++i ) for(var i = 0; i < arr_graphic_objects.length; ++i )
{ {
global_MatrixTransformer.MultiplyAppend(arr_graphic_objects[i].getTransformMatrix(), this.transformText); global_MatrixTransformer.MultiplyAppend(arr_graphic_objects[i].getTransformMatrix(), this.transformText);
if(arr_graphic_objects[i].GraphicObj instanceof CChartAsGroup)
{
var obj = arr_graphic_objects[i].GraphicObj;
obj.invertTransform = global_MatrixTransformer.Invert(obj.transform);
if(isRealObject(obj.chartTitle))
{
global_MatrixTransformer.MultiplyAppend(obj.chartTitle.transform, this.transformText);
global_MatrixTransformer.MultiplyAppend(obj.chartTitle.transformText, this.transformText);
obj.chartTitle.invertTransform = global_MatrixTransformer.Invert(obj.chartTitle.transform);
obj.chartTitle.invertTransformText = global_MatrixTransformer.Invert(obj.chartTitle.transformText);
}
if(isRealObject(obj.hAxisTitle))
{
global_MatrixTransformer.MultiplyAppend(obj.hAxisTitle.transform, this.transformText);
global_MatrixTransformer.MultiplyAppend(obj.hAxisTitle.transformText, this.transformText);
obj.hAxisTitle.invertTransform = global_MatrixTransformer.Invert(obj.hAxisTitle.transform);
obj.hAxisTitle.invertTransformText = global_MatrixTransformer.Invert(obj.hAxisTitle.transformText);
}
if(isRealObject(obj.vAxisTitle))
{
global_MatrixTransformer.MultiplyAppend(obj.vAxisTitle.transform, this.transformText);
global_MatrixTransformer.MultiplyAppend(obj.vAxisTitle.transformText, this.transformText);
obj.vAxisTitle.invertTransform = global_MatrixTransformer.Invert(obj.vAxisTitle.transform);
obj.vAxisTitle.invertTransformText = global_MatrixTransformer.Invert(obj.vAxisTitle.transformText);
}
}
arr_graphic_objects[i].updateCursorTypes(); arr_graphic_objects[i].updateCursorTypes();
} }
}, },
...@@ -5661,25 +5691,34 @@ WordShape.prototype = ...@@ -5661,25 +5691,34 @@ WordShape.prototype =
{ {
arr_graphic_objects[i].GraphicObj.recalculate(); arr_graphic_objects[i].GraphicObj.recalculate();
global_MatrixTransformer.MultiplyAppend(arr_graphic_objects[i].getTransformMatrix(), this.transformText); global_MatrixTransformer.MultiplyAppend(arr_graphic_objects[i].getTransformMatrix(), this.transformText);
if(arr_graphic_objects[i] instanceof CChartAsGroup) if(arr_graphic_objects[i].GraphicObj instanceof CChartAsGroup)
{ {
var obj = arr_graphic_objects[i]; var obj = arr_graphic_objects[i].GraphicObj;
obj.invertTransform = global_MatrixTransformer.Invert(obj.transform);
if(isRealObject(obj.chartTitle)) if(isRealObject(obj.chartTitle))
{ {
global_MatrixTransformer.MultiplyAppend(obj.chartTitle.transform, this.transformText); global_MatrixTransformer.MultiplyAppend(obj.chartTitle.transform, this.transformText);
global_MatrixTransformer.MultiplyAppend(obj.chartTitle.transformText, this.transformText); global_MatrixTransformer.MultiplyAppend(obj.chartTitle.transformText, this.transformText);
obj.chartTitle.invertTransform = global_MatrixTransformer.Invert(obj.chartTitle.transform);
obj.chartTitle.invertTransformText = global_MatrixTransformer.Invert(obj.chartTitle.transformText);
} }
if(isRealObject(obj.hAxisTitle)) if(isRealObject(obj.hAxisTitle))
{ {
global_MatrixTransformer.MultiplyAppend(obj.hAxisTitle.transform, this.transformText); global_MatrixTransformer.MultiplyAppend(obj.hAxisTitle.transform, this.transformText);
global_MatrixTransformer.MultiplyAppend(obj.hAxisTitle.transformText, this.transformText); global_MatrixTransformer.MultiplyAppend(obj.hAxisTitle.transformText, this.transformText);
obj.hAxisTitle.invertTransform = global_MatrixTransformer.Invert(obj.hAxisTitle.transform);
obj.hAxisTitle.invertTransformText = global_MatrixTransformer.Invert(obj.hAxisTitle.transformText);
} }
if(isRealObject(obj.vAxisTitle)) if(isRealObject(obj.vAxisTitle))
{ {
global_MatrixTransformer.MultiplyAppend(obj.vAxisTitle.transform, this.transformText); global_MatrixTransformer.MultiplyAppend(obj.vAxisTitle.transform, this.transformText);
global_MatrixTransformer.MultiplyAppend(obj.vAxisTitle.transformText, this.transformText); global_MatrixTransformer.MultiplyAppend(obj.vAxisTitle.transformText, this.transformText);
obj.vAxisTitle.invertTransform = global_MatrixTransformer.Invert(obj.vAxisTitle.transform);
obj.vAxisTitle.invertTransformText = global_MatrixTransformer.Invert(obj.vAxisTitle.transformText);
} }
} }
arr_graphic_objects[i].updateCursorTypes(); arr_graphic_objects[i].updateCursorTypes();
......
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