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

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53268 954022d7-b5bf-4e40-9824-e11837661b57
parent 52af045b
...@@ -370,19 +370,7 @@ CImageShape.prototype = ...@@ -370,19 +370,7 @@ CImageShape.prototype =
this.recalculateBrush(aImagesSync); this.recalculateBrush(aImagesSync);
this.recalcInfo.recalculateBrush = false; this.recalcInfo.recalculateBrush = false;
} }
this.recalculateBounds();
try
{
var boundsChecker = new CSlideBoundsChecker();
this.draw(boundsChecker);
boundsChecker.CorrectBounds();
this.bounds.x = boundsChecker.Bounds.min_x;
this.bounds.y = boundsChecker.Bounds.min_y;
this.bounds.w = boundsChecker.Bounds.max_x - boundsChecker.Bounds.min_x;
this.bounds.h = boundsChecker.Bounds.max_y - boundsChecker.Bounds.min_y;
}
catch(e)
{}
}, },
recalculateBrush: function(aImagesSync) recalculateBrush: function(aImagesSync)
...@@ -464,20 +452,7 @@ CImageShape.prototype = ...@@ -464,20 +452,7 @@ CImageShape.prototype =
global_MatrixTransformer.MultiplyAppend(this.transform, this.group.getTransform()); global_MatrixTransformer.MultiplyAppend(this.transform, this.group.getTransform());
} }
this.invertTransform = global_MatrixTransformer.Invert(this.transform); this.invertTransform = global_MatrixTransformer.Invert(this.transform);
this.recalculateBounds();
try
{
var boundsChecker = new CSlideBoundsChecker();
this.draw(boundsChecker);
boundsChecker.CorrectBounds();
this.bounds.x = boundsChecker.Bounds.min_x;
this.bounds.y = boundsChecker.Bounds.min_y;
this.bounds.w = boundsChecker.Bounds.max_x - boundsChecker.Bounds.min_x;
this.bounds.h = boundsChecker.Bounds.max_y - boundsChecker.Bounds.min_y;
}
catch(e)
{}
}, },
calculateTransformTextMatrix: function() calculateTransformTextMatrix: function()
...@@ -934,6 +909,22 @@ CImageShape.prototype = ...@@ -934,6 +909,22 @@ CImageShape.prototype =
return false; return false;
}, },
recalculateBounds: function()
{
try
{
var boundsChecker = new CSlideBoundsChecker();
this.draw(boundsChecker);
boundsChecker.CorrectBounds();
this.bounds.x = boundsChecker.Bounds.min_x;
this.bounds.y = boundsChecker.Bounds.min_y;
this.bounds.w = boundsChecker.Bounds.max_x - boundsChecker.Bounds.min_x;
this.bounds.h = boundsChecker.Bounds.max_y - boundsChecker.Bounds.min_y;
}
catch(e)
{}
},
hitInTextRect: function(x, y) hitInTextRect: function(x, y)
{ {
......
...@@ -1228,6 +1228,14 @@ CShape.prototype = ...@@ -1228,6 +1228,14 @@ CShape.prototype =
} }
} }
this.calculateContent();
this.calculateTransformTextMatrix();
this.recalculateBounds();
},
recalculateBounds: function()
{
try try
{ {
var boundsChecker = new CSlideBoundsChecker(); var boundsChecker = new CSlideBoundsChecker();
...@@ -1240,8 +1248,6 @@ CShape.prototype = ...@@ -1240,8 +1248,6 @@ CShape.prototype =
} }
catch(e) catch(e)
{} {}
this.calculateContent();
this.calculateTransformTextMatrix();
}, },
setDrawingDocument: function(drawingDocument) setDrawingDocument: function(drawingDocument)
...@@ -2119,18 +2125,7 @@ CShape.prototype = ...@@ -2119,18 +2125,7 @@ CShape.prototype =
} }
this.invertTransform = global_MatrixTransformer.Invert(this.transform); this.invertTransform = global_MatrixTransformer.Invert(this.transform);
try this.recalculateBounds();
{
var boundsChecker = new CSlideBoundsChecker();
this.draw(boundsChecker);
boundsChecker.CorrectBounds();
this.bounds.x = boundsChecker.Bounds.min_x;
this.bounds.y = boundsChecker.Bounds.min_y;
this.bounds.w = boundsChecker.Bounds.max_x - boundsChecker.Bounds.min_x;
this.bounds.h = boundsChecker.Bounds.max_y - boundsChecker.Bounds.min_y;
}
catch(e)
{}
}, },
normalize: function() normalize: 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