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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48600 954022d7-b5bf-4e40-9824-e11837661b57
parent 01dc7c71
......@@ -65,6 +65,60 @@ CChartAsGroup.prototype =
},
getBoundsInGroup: function()
{
return {minX: this.x, minY: this.y, maxX: this.x + this.extX, maxY: this.y + this.extY};
var r = this.rot;
if((r >= 0 && r < Math.PI*0.25)
|| (r > 3*Math.PI*0.25 && r < 5*Math.PI*0.25)
|| (r > 7*Math.PI*0.25 && r < 2*Math.PI))
{
}
else
{
var hc = this.extX*0.5;
var vc = this.extY*0.5;
var xc = this.x + hc;
var yc = this.y + vc;
return {minX: xc - vc, minY: yc - hc, maxX: xc + vc, maxY: yc + hc};
}
},
hitInTextRect: function()
{
return false;
},
setGroup: function(group)
{
var oldId = isRealObject(this.group) ? this.group.Get_Id() : null;
var newId = isRealObject(group) ? group.Get_Id() : null;
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_SetGroup, null, null,
new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataGOSingleProp(oldId, newId)));
this.group = group;
},
hitInInnerArea: function(x, y)
{
var invert_transform = this.getInvertTransform();
var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y);
if(isRealObject(this.spPr.geometry))
return this.spPr.geometry.hitInInnerArea(this.drawingObjects.getCanvasContext(), x_t, y_t);
return x_t > 0 && x_t < this.extX && y_t > 0 && y_t < this.extY;
},
hitInPath: function(x, y)
{
var invert_transform = this.getInvertTransform();
var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y);
if(isRealObject(this.spPr.geometry))
return this.spPr.geometry.hitInPath(this.drawingObjects.getCanvasContext(), x_t, y_t);
return false;
},
recalculateColors: function()
{
......@@ -91,6 +145,22 @@ CChartAsGroup.prototype =
return false;
},
Get_Props: function(OtherProps)
{
var Props = new Object();
Props.Width = this.extX;
Props.Height = this.extY;
if(!isRealObject(OtherProps))
return Props;
OtherProps.Width = OtherProps.Width === Props.Width ? Props.Width : undefined;
OtherProps.Height = OtherProps.Height === Props.Height ? Props.Height : undefined;
return OtherProps;
},
syncAscChart: function() {
if ( this.chartTitle && this.chartTitle.txBody && this.chartTitle.txBody.content ) {
......@@ -1976,6 +2046,11 @@ CChartAsGroup.prototype =
return tx > 0 && tx < this.extX && ty > 0 && ty < this.extY;
},
canGroup: function()
{
return true;
},
canRotate: function()
{
return false;
......
......@@ -2353,7 +2353,7 @@ function CompareUniFill(unifill_1, unifill_2)
function CompareShapeProperties(shapeProp1, shapeProp2)
{
var _result_shape_prop = {};
var _result_shape_prop = new asc_CShapeProperty();
if(shapeProp1.type === shapeProp2.type)
{
_result_shape_prop.type = shapeProp1.type;
......@@ -2382,7 +2382,7 @@ function CompareShapeProperties(shapeProp1, shapeProp2)
function CompareImageProperties(imgProps1, imgProps2)
{
var _result_image_properties = {};
var _result_image_properties = new asc_CImgProperty();
if(imgProps1.Width == null || imgProps2.Width == null)
{
_result_image_properties.Width = null;
......
......@@ -989,7 +989,19 @@ CImage.prototype =
Props.Width = this.extX;
Props.Height = this.extY;
if(!isRealObject(OtherProps))
return Props;
OtherProps.Width = OtherProps.Width === Props.Width ? Props.Width : undefined;
OtherProps.Height = OtherProps.Height === Props.Height ? Props.Height : undefined;
return OtherProps;
},
getImageProps: function()
{
return {ImageUrl: this.blipFill.RasterImageId, Width: this.extX, Height: this.extY};
},
......
This diff is collapsed.
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