Commit 09de444e authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35092

parent 795e8617
......@@ -38,6 +38,7 @@ function XYAdjustmentTrack(originalShape, adjIndex, bTextWarp)
{
AscFormat.ExecuteNoHistory(function(){
this.originalShape = originalShape;
this.bIsTracked = false;
var oPen, oBrush;
if(bTextWarp !== true)
......@@ -194,6 +195,7 @@ XYAdjustmentTrack.prototype.draw = function(overlay)
XYAdjustmentTrack.prototype.track = function(posX, posY)
{
this.bIsTracked = true;
var invert_transform = this.invertTransform;
var _relative_x = invert_transform.TransformPointX(posX, posY);
var _relative_y = invert_transform.TransformPointY(posX, posY);
......@@ -253,6 +255,9 @@ XYAdjustmentTrack.prototype.track = function(posX, posY)
XYAdjustmentTrack.prototype.trackEnd = function()
{
if(!this.bIsTracked){
return;
}
var oGeometryToSet;
if(!this.bTextWarp)
{
......@@ -304,6 +309,7 @@ XYAdjustmentTrack.prototype.trackEnd = function()
function PolarAdjustmentTrack(originalShape, adjIndex, bTextWarp)
{
AscFormat.ExecuteNoHistory(function(){
this.bIsTracked = false;
this.originalShape = originalShape;
......@@ -405,6 +411,7 @@ function PolarAdjustmentTrack(originalShape, adjIndex, bTextWarp)
this.track = function(posX, posY)
{
this.bIsTracked = true;
var invert_transform = this.invertTransform;
var _relative_x = invert_transform.TransformPointX(posX, posY);
var _relative_y = invert_transform.TransformPointY(posX, posY);
......@@ -459,6 +466,9 @@ function PolarAdjustmentTrack(originalShape, adjIndex, bTextWarp)
this.trackEnd = function()
{
if(!this.bIsTracked){
return;
}
var oGeometryToSet;
if(!this.bTextWarp)
{
......
......@@ -39,6 +39,7 @@
function MoveShapeImageTrack(originalObject)
{
this.bIsTracked = false;
this.originalObject = originalObject;
this.transform = new CMatrix();
this.x = null;
......@@ -79,6 +80,7 @@ function MoveShapeImageTrack(originalObject)
this.track = function(dx, dy, pageIndex)
{
this.bIsTracked = true;
this.lastDx = dx;
this.lastDy = dy;
var original = this.originalObject;
......@@ -126,6 +128,9 @@ function MoveShapeImageTrack(originalObject)
this.trackEnd = function(bWord)
{
if(!this.bIsTracked){
return;
}
if(bWord)
{
if(this.originalObject.selectStartPage !== this.pageIndex)
......@@ -241,6 +246,7 @@ MoveShapeImageTrack.prototype.getBounds = function()
function MoveGroupTrack(originalObject)
{
this.bIsTracked = false;
this.x = null;
this.y = null;
this.originalObject = originalObject;
......@@ -265,6 +271,7 @@ function MoveGroupTrack(originalObject)
this.track = function(dx, dy, pageIndex)
{
this.bIsTracked = true;
this.pageIndex = pageIndex;
var original = this.originalObject;
this.x = original.x + dx;
......@@ -317,6 +324,9 @@ function MoveGroupTrack(originalObject)
this.trackEnd = function(bWord)
{
if(!this.bIsTracked){
return;
}
if(bWord)
{
this.x = 0;
......@@ -340,12 +350,14 @@ function MoveGroupTrack(originalObject)
function MoveComment(comment)
{
this.bIsTracked = false;
this.comment = comment;
this.x = comment.x;
this.y = comment.y;
this.track = function(dx, dy)
{
this.bIsTracked = true;
var original = this.comment;
this.x = original.x + dx;
this.y = original.y + dy;
......@@ -366,6 +378,9 @@ function MoveComment(comment)
this.trackEnd = function()
{
if(!this.bIsTracked){
return;
}
this.comment.setPosition(this.x, this.y);
};
}
......
......@@ -191,6 +191,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController
{
AscFormat.ExecuteNoHistory(function()
{
this.bIsTracked = false;
this.originalObject = originalObject;
this.numberHandle = originalObject.getNumByCardDirection(cardDirection);
this.lastSpPr = null;
......@@ -309,7 +310,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController
this.resizedRot = originalObject.rot;
this.transform = originalObject.transform.CreateDublicate();
this.geometry = (function(){ var geometry = originalObject.getGeom(); geometry.Recalculate(5, 5); return geometry})();
this.geometry = (function(){ return originalObject.getGeom();})();
if(!originalObject.isChart())
{
......@@ -458,6 +459,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController
};
this.track = function(kd1, kd2, e, x, y){
this.bIsTracked = true;
if(this.bConnector){
this.resizeConnector(kd1, kd2, e, x, y);
}
......@@ -967,6 +969,9 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController
this.trackEnd = function(bWord)
{
if(!this.bIsTracked){
return;
}
if(!this.bConnector || !this.oSpPr){
var scale_coefficients, ch_off_x, ch_off_y;
if(this.originalObject.group)
......@@ -1048,6 +1053,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
{
AscFormat.ExecuteNoHistory(function()
{
this.bIsTracked = false;
this.original = originalObject;
this.originalObject = originalObject;
......@@ -1177,6 +1183,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
this.track = function(kd1, kd2, e)
{
this.bIsTracked = true;
if(!e.CtrlKey)
this.resize(kd1, kd2, e.ShiftKey);
else
......@@ -1674,6 +1681,9 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
this.trackEnd = function(bWord)
{
if(!this.bIsTracked){
return;
}
if(!AscCommon.isRealObject(this.original.group))
{
this.original.normalize();
......
......@@ -350,6 +350,7 @@ ObjectToDraw.prototype =
};
function RotateTrackShapeImage(originalObject)
{
this.bIsTracked = false;
this.originalObject = originalObject;
this.transform = new CMatrix();
var brush;
......@@ -379,6 +380,7 @@ function RotateTrackShapeImage(originalObject)
this.track = function(angle, e)
{
this.bIsTracked = true;
var new_rot = angle + this.originalObject.rot;
while(new_rot < 0)
new_rot += 2*Math.PI;
......@@ -429,6 +431,9 @@ function RotateTrackShapeImage(originalObject)
this.trackEnd = function()
{
if(!this.bIsTracked){
return;
}
AscFormat.CheckSpPrXfrm(this.originalObject);
this.originalObject.spPr.xfrm.setRot(this.angle);
};
......@@ -480,6 +485,7 @@ function RotateTrackShapeImage(originalObject)
function RotateTrackGroup(originalObject)
{
this.bIsTracked = false;
this.originalObject = originalObject;
this.transform = new CMatrix();
......@@ -548,6 +554,7 @@ function RotateTrackGroup(originalObject)
this.track = function(angle, e)
{
this.bIsTracked = true;
var new_rot = angle + this.originalObject.rot;
while(new_rot < 0)
new_rot += 2*Math.PI;
......@@ -591,6 +598,9 @@ function RotateTrackGroup(originalObject)
this.trackEnd = function()
{
if(!this.bIsTracked){
return;
}
AscFormat.CheckSpPrXfrm(this.originalObject);
this.originalObject.spPr.xfrm.setRot(this.angle);
}
......@@ -598,6 +608,7 @@ function RotateTrackGroup(originalObject)
function Chart3dAdjustTrack(oChartSpace, numHandle, startX, startY)
{
this.bIsTracked = false;
this.chartSpace = oChartSpace;
......@@ -808,6 +819,7 @@ function Chart3dAdjustTrack(oChartSpace, numHandle, startX, startY)
this.track = function(x, y)
{
this.bIsTracked = true;
var tx = this.chartSpace.invertTransform.TransformPointX(x, y);
var ty = this.chartSpace.invertTransform.TransformPointY(x, y);
......@@ -858,6 +870,9 @@ function Chart3dAdjustTrack(oChartSpace, numHandle, startX, startY)
this.trackEnd = function()
{
if(!this.bIsTracked){
return;
}
oChartSpace.chart.setView3D(this.view3D.createDuplicate());
oChartSpace.setRecalculateInfo();
}
......
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