Commit 8a95061e 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@49525 954022d7-b5bf-4e40-9824-e11837661b57
parent 31820ea4
...@@ -2099,9 +2099,9 @@ function CDrawingDocument() ...@@ -2099,9 +2099,9 @@ function CDrawingDocument()
} }
// вот здесь весь трекинг // вот здесь весь трекинг
this.DrawTrack = function(type, matrix, left, top, width, height, isLine) this.DrawTrack = function(type, matrix, left, top, width, height, isLine, canRotate)
{ {
this.AutoShapesTrack.DrawTrack(type, matrix, left, top, width, height, isLine); this.AutoShapesTrack.DrawTrack(type, matrix, left, top, width, height, isLine,canRotate);
} }
this.LockSlide = function(slideNum) this.LockSlide = function(slideNum)
......
This diff is collapsed.
...@@ -57,6 +57,34 @@ function CImageShape(parent) ...@@ -57,6 +57,34 @@ function CImageShape(parent)
CImageShape.prototype = CImageShape.prototype =
{ {
isSimpleObject: function()
{
return true;
},
normalize: function()
{
var new_off_x, new_off_y, new_ext_x, new_ext_y;
var xfrm = this.spPr.xfrm;
if(!isRealObject(this.group))
{
new_off_x = xfrm.offX;
new_off_y = xfrm.offY;
new_ext_x = xfrm.extX;
new_ext_y = xfrm.extY;
}
else
{
var scale_scale_coefficients = this.group.getResultScaleCoefficients();
new_off_x = scale_scale_coefficients.cx*(xfrm.offX - this.group.spPr.xfrm.chOffX);
new_off_y = scale_scale_coefficients.cy*(xfrm.offY - this.group.spPr.xfrm.chOffY);
new_ext_x = scale_scale_coefficients.cx*xfrm.extX;
new_ext_y = scale_scale_coefficients.cy*xfrm.extY;
}
this.setOffset(new_off_x, new_off_y);
this.setExtents(new_ext_x, new_ext_y);
},
sendMouseData: function() sendMouseData: function()
{ {
...@@ -825,49 +853,63 @@ CImageShape.prototype = ...@@ -825,49 +853,63 @@ CImageShape.prototype =
hitToHandles: function(x, y) hitToHandles: function(x, y)
{ {
var px = this.invertTransform.TransformPointX(x, y); var invert_transform = this.getInvertTransform();
var py = this.invertTransform.TransformPointY(x, y); var t_x, t_y;
var distance = this.drawingDocument.GetMMPerDot(TRACK_CIRCLE_RADIUS); t_x = invert_transform.TransformPointX(x, y);
var dx, dy; t_y = invert_transform.TransformPointY(x, y);
dx = px; var radius = this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_CIRCLE_RADIUS);
dy = py;
if(Math.sqrt(dx*dx + dy*dy) < distance)
return 0;
var width = this.extX; var sqr_x = t_x*t_y, sqr_y = t_y*t_y;
var height = this.extY; if(Math.sqrt(sqr_x + sqr_y) < radius)
var hc = width*0.5; return 0;
var vc = height*0.5;
dx = px - hc; var hc = this.extX*0.5;
if(Math.sqrt(dx*dx + dy*dy) < distance) var dist_x = t_x - hc;
sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 1; return 1;
dx = px - width; dist_x = t_x - this.extX;
if(Math.sqrt(dx*dx + dy*dy) < distance) sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 2; return 2;
dy = py - vc; var vc = this.extY*0.5;
if(Math.sqrt(dx*dx + dy*dy) < distance) var dist_y = t_y - vc;
sqr_y = dist_y*dist_y;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 3; return 3;
dy = py - height; dist_y = t_y - this.extY;
if(Math.sqrt(dx*dx + dy*dy) < distance) sqr_y = dist_y*dist_y;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 4; return 4;
dx = px - hc; dist_x = t_x - hc;
if(Math.sqrt(dx*dx + dy*dy) < distance) sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 5; return 5;
dx = px; dist_x = t_x;
if(Math.sqrt(dx*dx + dy*dy) < distance) sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 6; return 6;
dy = py - vc; dist_y = t_y - vc;
if(Math.sqrt(dx*dx + dy*dy) < distance) sqr_y = dist_y*dist_y;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 7; return 7;
var rotate_distance = this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_DISTANCE_ROTATE);;
dist_y = t_y + rotate_distance;
sqr_y = dist_y*dist_y;
dist_x = t_x - hc;
sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 8;
return -1; return -1;
}, },
......
...@@ -3862,7 +3862,7 @@ CPresentation.prototype = ...@@ -3862,7 +3862,7 @@ CPresentation.prototype =
{ {
this.CurPage = PageIndex; this.CurPage = PageIndex;
this.Slides[this.CurPage].onMouseMove(e, X, Y); this.Slides[this.CurPage].onMouseMove(e, X, Y);
this.Update_CursorType( X, Y, PageIndex, e ); //this.Update_CursorType( X, Y, PageIndex, e );
return; return;
return; return;
if ( PageIndex < 0 ) if ( PageIndex < 0 )
......
...@@ -1933,6 +1933,29 @@ CShape.prototype = ...@@ -1933,6 +1933,29 @@ CShape.prototype =
} }
}, },
normalize: function()
{
var new_off_x, new_off_y, new_ext_x, new_ext_y;
var xfrm = this.spPr.xfrm;
if(!isRealObject(this.group))
{
new_off_x = xfrm.offX;
new_off_y = xfrm.offY;
new_ext_x = xfrm.extX;
new_ext_y = xfrm.extY;
}
else
{
var scale_scale_coefficients = this.group.getResultScaleCoefficients();
new_off_x = scale_scale_coefficients.cx*(xfrm.offX - this.group.spPr.xfrm.chOffX);
new_off_y = scale_scale_coefficients.cy*(xfrm.offY - this.group.spPr.xfrm.chOffY);
new_ext_x = scale_scale_coefficients.cx*xfrm.extX;
new_ext_y = scale_scale_coefficients.cy*xfrm.extY;
}
this.setOffset(new_off_x, new_off_y);
this.setExtents(new_ext_x, new_ext_y);
},
setRotate: function(rot) setRotate: function(rot)
{ {
var xfrm = this.spPr.xfrm; var xfrm = this.spPr.xfrm;
...@@ -1988,9 +2011,9 @@ CShape.prototype = ...@@ -1988,9 +2011,9 @@ CShape.prototype =
{ {
checker._s(); checker._s();
checker._m(0, 0); checker._m(0, 0);
checker._l(this.absExtX, 0); checker._l(this.extX, 0);
checker._l(this.absExtX, this.absExtY); checker._l(this.extX, this.extY);
checker._l(0, this.absExtY); checker._l(0, this.extY);
checker._z(); checker._z();
checker._e(); checker._e();
} }
...@@ -2245,6 +2268,11 @@ CShape.prototype = ...@@ -2245,6 +2268,11 @@ CShape.prototype =
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this; editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
}, },
isSimpleObject: function()
{
return true;
},
draw: function(graphics) draw: function(graphics)
{ {
/*graphics.SetIntegerGrid(false); /*graphics.SetIntegerGrid(false);
......
...@@ -154,11 +154,11 @@ CTextBody.prototype = ...@@ -154,11 +154,11 @@ CTextBody.prototype =
{ {
var Doc = this.content; var Doc = this.content;
if ( true === Doc.Is_SelectionUse() && !Doc.Selection_IsEmpty()) { if ( true === Doc.Is_SelectionUse() && !Doc.Selection_IsEmpty()) {
drawingDocument.UpdateTargetTransform(this.shape.transformText); drawingDocument.UpdateTargetTransform(this.shape.transformText);
drawingDocument.TargetEnd(); drawingDocument.TargetEnd();
drawingDocument.SelectEnabled(true); drawingDocument.SelectEnabled(true);
drawingDocument.SelectClear(); drawingDocument.SelectClear();
Doc.Selection_Draw(); this.content.Selection_Draw_Page(this.shape.parent.num);
drawingDocument.SelectShow(); drawingDocument.SelectShow();
} }
else /*if(this.parent.elementsManipulator.Document.CurPos.Type == docpostype_FlowObjects ) */ else /*if(this.parent.elementsManipulator.Document.CurPos.Type == docpostype_FlowObjects ) */
...@@ -278,6 +278,16 @@ CTextBody.prototype = ...@@ -278,6 +278,16 @@ CTextBody.prototype =
this.content.Recalculate_Page(0, true); this.content.Recalculate_Page(0, true);
}, },
updateCursorType: function(x, y, e)
{
if(this.shape && this.shape.invertTransformText)
{
var tx = this.shape.invertTransformText.TransformPointX(x, y);
var ty = this.shape.invertTransformText.TransformPointY(x, y);
this.content.Update_CursorType(tx, ty, 0);
}
},
Get_StartPage_Absolute: function() Get_StartPage_Absolute: function()
{ {
return isRealObject(this.shape) && isRealObject(this.shape.parent) && isRealNumber(this.shape.parent.num) ? this.shape.parent.num : 0; return isRealObject(this.shape) && isRealObject(this.shape.parent) && isRealNumber(this.shape.parent.num) ? this.shape.parent.num : 0;
......
...@@ -474,7 +474,7 @@ CGraphicObjects.prototype = { ...@@ -474,7 +474,7 @@ CGraphicObjects.prototype = {
{ {
shapes.push(selected_object); shapes.push(selected_object);
} }
else if(typeof selected_object.isImage()) else if(selected_object.isImage())
{ {
images.push(selected_object); images.push(selected_object);
} }
...@@ -584,7 +584,7 @@ CGraphicObjects.prototype = { ...@@ -584,7 +584,7 @@ CGraphicObjects.prototype = {
{ {
var cur_group = groups[i]; var cur_group = groups[i];
var arr_by_types = cur_group.getArraysByTypes(); var arr_by_types = cur_group.getArraysByTypes();
var images = cur_group.images; var images = arr_by_types.images;
for(var i = 0; i < images.length; ++i) for(var i = 0; i < images.length; ++i)
{ {
var _cur_image_prop = images[i].getImageProps(); var _cur_image_prop = images[i].getImageProps();
...@@ -601,7 +601,7 @@ CGraphicObjects.prototype = { ...@@ -601,7 +601,7 @@ CGraphicObjects.prototype = {
} }
} }
var shapes = cur_group.shapes; var shapes = arr_by_types.shapes;
for(var i = 0; i < shapes.length; ++i) for(var i = 0; i < shapes.length; ++i)
{ {
var _current_object = shapes[i]; var _current_object = shapes[i];
......
...@@ -265,6 +265,8 @@ var historyitem_SetShapeOffset = 1; ...@@ -265,6 +265,8 @@ var historyitem_SetShapeOffset = 1;
var historyitem_SetShapeExtents = 2; var historyitem_SetShapeExtents = 2;
var historyitem_SetShapeFlips = 3; var historyitem_SetShapeFlips = 3;
var historyitem_SetShapeParent = 4; var historyitem_SetShapeParent = 4;
var historyitem_SetShapeChildOffset = 5;
var historyitem_SetShapeChildExtents = 6;
......
This diff is collapsed.
...@@ -93,16 +93,14 @@ function MoveShapeImageTrackInGroup(originalObject) ...@@ -93,16 +93,14 @@ function MoveShapeImageTrackInGroup(originalObject)
} }
global_MatrixTransformer.RotateRadAppend(t, -this.originalObject.rot); global_MatrixTransformer.RotateRadAppend(t, -this.originalObject.rot);
global_MatrixTransformer.TranslateAppend(t, this.x + this.originalObject.extX*0.5, this.y + this.originalObject.extY*0.5); global_MatrixTransformer.TranslateAppend(t, this.x + this.originalObject.extX*0.5, this.y + this.originalObject.extY*0.5);
global_MatrixTransformer.MultiplyAppend(t, this.originalObject.group.getTransform()); global_MatrixTransformer.MultiplyAppend(t, this.originalObject.group.getTransformMatrix());
}; };
this.trackEnd = function() this.trackEnd = function()
{ {
var scale_scale_coefficients = this.originalObject.group.getResultScaleCoefficients(); var scale_scale_coefficients = this.originalObject.group.getResultScaleCoefficients();
var xfrm = this.originalObject.group.spPr.xfrm; var xfrm = this.originalObject.group.spPr.xfrm;
this.originalObject.setPosition(this.x/scale_scale_coefficients.cx + xfrm.chOffX, this.y/scale_scale_coefficients.cy + xfrm.chOffY); this.originalObject.setOffset(this.x/scale_scale_coefficients.cx + xfrm.chOffX, this.y/scale_scale_coefficients.cy + xfrm.chOffY);
this.originalObject.recalculateTransform();
this.originalObject.calculateTransformTextMatrix();
} }
} }
...@@ -120,7 +118,7 @@ function MoveGroupTrack(originalObject) ...@@ -120,7 +118,7 @@ function MoveGroupTrack(originalObject)
var group_invert_transform = originalObject.getInvertTransform(); var group_invert_transform = originalObject.getInvertTransform();
for(var i = 0; i < arr_graphic_objects.length; ++i) for(var i = 0; i < arr_graphic_objects.length; ++i)
{ {
var gr_obj_transform_copy = arr_graphic_objects[i].getTransform().CreateDublicate(); var gr_obj_transform_copy = arr_graphic_objects[i].getTransformMatrix().CreateDublicate();
global_MatrixTransformer.MultiplyAppend(gr_obj_transform_copy, group_invert_transform); global_MatrixTransformer.MultiplyAppend(gr_obj_transform_copy, group_invert_transform);
this.arrTransforms2[i] = gr_obj_transform_copy; this.arrTransforms2[i] = gr_obj_transform_copy;
this.overlayObjects[i] = new OverlayObject(arr_graphic_objects[i].spPr.geometry, arr_graphic_objects[i].extX, arr_graphic_objects[i].extY, this.overlayObjects[i] = new OverlayObject(arr_graphic_objects[i].spPr.geometry, arr_graphic_objects[i].extX, arr_graphic_objects[i].extY,
...@@ -168,13 +166,7 @@ function MoveGroupTrack(originalObject) ...@@ -168,13 +166,7 @@ function MoveGroupTrack(originalObject)
this.trackEnd = function() this.trackEnd = function()
{ {
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateUndo, null, null, this.originalObject.setXfrm(this.x, this.y, null, null, null, null, null);
new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
this.originalObject.setPosition(this.x, this.y);
this.originalObject.recalculate();
this.originalObject.updateDrawingBaseCoordinates();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateRedo, null, null,
new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
}; };
} }
...@@ -230,7 +222,7 @@ function MoveTitleInChart(originalObject) ...@@ -230,7 +222,7 @@ function MoveTitleInChart(originalObject)
t.Reset(); t.Reset();
global_MatrixTransformer.TranslateAppend(t, -this.originalObject.extX*0.5, -this.originalObject.extY*0.5); global_MatrixTransformer.TranslateAppend(t, -this.originalObject.extX*0.5, -this.originalObject.extY*0.5);
global_MatrixTransformer.TranslateAppend(t, this.x + this.originalObject.extX*0.5, this.y + this.originalObject.extY*0.5); global_MatrixTransformer.TranslateAppend(t, this.x + this.originalObject.extX*0.5, this.y + this.originalObject.extY*0.5);
global_MatrixTransformer.MultiplyAppend(t, this.originalObject.chartGroup.getTransform()); global_MatrixTransformer.MultiplyAppend(t, this.originalObject.chartGroup.getTransformMatrix());
}; };
this.trackEnd = function() this.trackEnd = function()
......
...@@ -972,7 +972,7 @@ function ResizeTrackShapeImageInGroup(originalObject, cardDirection) ...@@ -972,7 +972,7 @@ function ResizeTrackShapeImageInGroup(originalObject, cardDirection)
global_MatrixTransformer.TranslateAppend(_transform, this.resizedPosX, this.resizedPosY); global_MatrixTransformer.TranslateAppend(_transform, this.resizedPosX, this.resizedPosY);
global_MatrixTransformer.TranslateAppend(_transform, _horizontal_center, _vertical_center); global_MatrixTransformer.TranslateAppend(_transform, _horizontal_center, _vertical_center);
global_MatrixTransformer.MultiplyAppend(_transform, this.originalObject.group.getTransform()); global_MatrixTransformer.MultiplyAppend(_transform, this.originalObject.group.getTransformMatrix());
}; };
this.resizeRelativeCenter = function(kd1, kd2, ShiftKey) this.resizeRelativeCenter = function(kd1, kd2, ShiftKey)
...@@ -1071,7 +1071,7 @@ function ResizeTrackShapeImageInGroup(originalObject, cardDirection) ...@@ -1071,7 +1071,7 @@ function ResizeTrackShapeImageInGroup(originalObject, cardDirection)
global_MatrixTransformer.TranslateAppend(_transform, this.resizedPosX, this.resizedPosY); global_MatrixTransformer.TranslateAppend(_transform, this.resizedPosX, this.resizedPosY);
global_MatrixTransformer.TranslateAppend(_transform, _horizontal_center, _vertical_center); global_MatrixTransformer.TranslateAppend(_transform, _horizontal_center, _vertical_center);
global_MatrixTransformer.MultiplyAppend(_transform, this.originalObject.group.getTransform()); global_MatrixTransformer.MultiplyAppend(_transform, this.originalObject.group.getTransformMatrix());
}; };
this.draw = function(overlay) this.draw = function(overlay)
...@@ -1118,12 +1118,9 @@ function ResizeTrackShapeImageInGroup(originalObject, cardDirection) ...@@ -1118,12 +1118,9 @@ function ResizeTrackShapeImageInGroup(originalObject, cardDirection)
{ {
var scale_scale_coefficients = this.originalObject.group.getResultScaleCoefficients(); var scale_scale_coefficients = this.originalObject.group.getResultScaleCoefficients();
var xfrm = this.originalObject.group.spPr.xfrm; var xfrm = this.originalObject.group.spPr.xfrm;
this.originalObject.setPosition(this.resizedPosX/scale_scale_coefficients.cx + xfrm.chOffX, this.resizedPosY/scale_scale_coefficients.cy + xfrm.chOffY); this.originalObject.setOffset(this.resizedPosX/scale_scale_coefficients.cx + xfrm.chOffX, this.resizedPosY/scale_scale_coefficients.cy + xfrm.chOffY);
this.originalObject.setExtents(this.resizedExtX/scale_scale_coefficients.cx, this.resizedExtY/scale_scale_coefficients.cy); this.originalObject.setExtents(this.resizedExtX/scale_scale_coefficients.cx, this.resizedExtY/scale_scale_coefficients.cy);
this.originalObject.setFlips(this.resizedflipH, this.resizedflipV); this.originalObject.setFlips(this.resizedflipH, this.resizedflipV);
this.originalObject.recalculateTransform();
this.originalObject.calculateContent();
this.originalObject.calculateTransformTextMatrix();
}; };
} }
...@@ -1745,9 +1742,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack) ...@@ -1745,9 +1742,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
this.trackEnd = function() this.trackEnd = function()
{ {
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateUndo, null, null, this.original.setOffset(this.x, this.y);
new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
this.original.setPosition(this.x, this.y);
this.original.setExtents(this.extX, this.extY); this.original.setExtents(this.extX, this.extY);
this.original.setChildExtents(this.extX, this.extY); this.original.setChildExtents(this.extX, this.extY);
this.original.setFlips(this.flipH, this.flipV); this.original.setFlips(this.flipH, this.flipV);
...@@ -1755,11 +1750,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack) ...@@ -1755,11 +1750,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
{ {
this.childs[i].trackEnd(); this.childs[i].trackEnd();
} }
if(this.parentTrack == null)
this.original.recalculate();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateRedo, null, null,
new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
}; };
...@@ -1842,7 +1833,7 @@ function ShapeForResizeInGroup(originalObject, parentTrack) ...@@ -1842,7 +1833,7 @@ function ShapeForResizeInGroup(originalObject, parentTrack)
this.trackEnd = function() this.trackEnd = function()
{ {
this.originalObject.setPosition(this.x, this.y); this.originalObject.setOffset(this.x, this.y);
this.originalObject.setExtents(this.extX, this.extY); this.originalObject.setExtents(this.extX, this.extY);
if(this.originalObject.spPr.geometry !== null) if(this.originalObject.spPr.geometry !== null)
this.originalObject.spPr.geometry.Recalculate(this.extX, this.extY); this.originalObject.spPr.geometry.Recalculate(this.extX, this.extY);
...@@ -2413,34 +2404,12 @@ function ResizeTrackChart(originalObject, cardDirection) ...@@ -2413,34 +2404,12 @@ function ResizeTrackChart(originalObject, cardDirection)
this.trackEnd = function() this.trackEnd = function()
{ {
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(this.originalObject.Id, new UndoRedoDataShapeRecalc()), null);
this.originalObject.x = this.resizedPosX; this.originalObject.x = this.resizedPosX;
this.originalObject.y = this.resizedPosY; this.originalObject.y = this.resizedPosY;
this.originalObject.extX = this.resizedExtX; this.originalObject.extX = this.resizedExtX;
this.originalObject.extY = this.resizedExtY; this.originalObject.extY = this.resizedExtY;
this.originalObject.setPosition(this.resizedPosX, this.resizedPosY); this.originalObject.setOffset(this.resizedPosX, this.resizedPosY);
this.originalObject.setExtents(this.resizedExtX, this.resizedExtY); this.originalObject.setExtents(this.resizedExtX, this.resizedExtY);
this.originalObject.updateDrawingBaseCoordinates();
// this.originalObject.setFlips(this.resizedflipH, this.resizedflipV);
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformRedo, null, null, new UndoRedoDataGraphicObjects(this.originalObject.Id, new UndoRedoDataShapeRecalc()), null);
this.originalObject.recalculate();
/*this.originalObject.recalculateTransform();
this.originalObject.calculateContent();
this.originalObject.calculateTransformTextMatrix();
*/ var bounds_rect = this.originalObject.getRectBounds();
var check_position = this.originalObject.drawingObjects.checkGraphicObjectPosition(bounds_rect.minX, bounds_rect.minY, bounds_rect.maxX - bounds_rect.minX, bounds_rect.maxY - bounds_rect.minY);
if(!check_position.result)
{
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(this.originalObject.Id, new UndoRedoDataShapeRecalc()), null);
this.originalObject.setPosition(this.resizedPosX + check_position.x, this.resizedPosY + check_position.y);
this.originalObject.x = this.resizedPosX+ check_position.x;
this.originalObject.y = this.resizedPosY+ check_position.y;
this.originalObject.updateDrawingBaseCoordinates();
this.originalObject.recalculate();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformRedo, null, null, new UndoRedoDataGraphicObjects(this.originalObject.Id, new UndoRedoDataShapeRecalc()), null);
}
}; };
} }
...@@ -205,15 +205,12 @@ function RotateTrackShapeImageInGroup(originalObject) ...@@ -205,15 +205,12 @@ function RotateTrackShapeImageInGroup(originalObject)
global_MatrixTransformer.ScaleAppend(this.transform, 1, -1); global_MatrixTransformer.ScaleAppend(this.transform, 1, -1);
global_MatrixTransformer.RotateRadAppend(this.transform, -this.angle); global_MatrixTransformer.RotateRadAppend(this.transform, -this.angle);
global_MatrixTransformer.TranslateAppend(this.transform, this.originalObject.x + hc, this.originalObject.y + vc); global_MatrixTransformer.TranslateAppend(this.transform, this.originalObject.x + hc, this.originalObject.y + vc);
global_MatrixTransformer.MultiplyAppend(this.transform, this.originalObject.group.getTransform()); global_MatrixTransformer.MultiplyAppend(this.transform, this.originalObject.group.getTransformMatrix());
}; };
this.trackEnd = function() this.trackEnd = function()
{ {
this.originalObject.setRotate(this.angle); this.originalObject.setRotate(this.angle);
this.originalObject.recalculateTransform();
this.originalObject.calculateContent();
this.originalObject.calculateTransformTextMatrix();
} }
} }
...@@ -232,7 +229,7 @@ function RotateTrackGroup(originalObject) ...@@ -232,7 +229,7 @@ function RotateTrackGroup(originalObject)
var group_invert_transform = originalObject.getInvertTransform(); var group_invert_transform = originalObject.getInvertTransform();
for(var i = 0; i < arr_graphic_objects.length; ++i) for(var i = 0; i < arr_graphic_objects.length; ++i)
{ {
var gr_obj_transform_copy = arr_graphic_objects[i].getTransform().CreateDublicate(); var gr_obj_transform_copy = arr_graphic_objects[i].getTransformMatrix().CreateDublicate();
global_MatrixTransformer.MultiplyAppend(gr_obj_transform_copy, group_invert_transform); global_MatrixTransformer.MultiplyAppend(gr_obj_transform_copy, group_invert_transform);
this.arrTransforms2[i] = gr_obj_transform_copy; this.arrTransforms2[i] = gr_obj_transform_copy;
this.overlayObjects[i] = new OverlayObject(arr_graphic_objects[i].spPr.geometry, arr_graphic_objects[i].extX, arr_graphic_objects[i].extY, this.overlayObjects[i] = new OverlayObject(arr_graphic_objects[i].spPr.geometry, arr_graphic_objects[i].extX, arr_graphic_objects[i].extY,
...@@ -295,11 +292,6 @@ function RotateTrackGroup(originalObject) ...@@ -295,11 +292,6 @@ function RotateTrackGroup(originalObject)
this.trackEnd = function() this.trackEnd = function()
{ {
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateUndo, null, null,
new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
this.originalObject.setRotate(this.angle); this.originalObject.setRotate(this.angle);
this.originalObject.recalculate();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateRedo, null, null,
new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
} }
} }
\ No newline at end of file
...@@ -73,6 +73,10 @@ ...@@ -73,6 +73,10 @@
<script type="text/javascript" src="Editor/Format/Presentation.js"></script> <script type="text/javascript" src="Editor/Format/Presentation.js"></script>
<script type="text/javascript" src="Editor/Format/Shape.js"></script> <script type="text/javascript" src="Editor/Format/Shape.js"></script>
<script type="text/javascript" src="Editor/Format/Image.js"></script> <script type="text/javascript" src="Editor/Format/Image.js"></script>
<script type="text/javascript" src="Editor/Format/Chart.js"></script>
<script type="text/javascript" src="Editor/Format/ChartLayout.js"></script>
<script type="text/javascript" src="Editor/Format/ChartLegend.js"></script>
<script type="text/javascript" src="Editor/Format/ChartTitle.js"></script>
<script type="text/javascript" src="Editor/Format/GroupShape.js"></script> <script type="text/javascript" src="Editor/Format/GroupShape.js"></script>
<script type="text/javascript" src="Editor/Format/Slide.js"></script> <script type="text/javascript" src="Editor/Format/Slide.js"></script>
<script type="text/javascript" src="Editor/Format/SlideMaster.js"></script> <script type="text/javascript" src="Editor/Format/SlideMaster.js"></script>
......
...@@ -3626,11 +3626,11 @@ asc_docs_api.prototype.sync_slidePropCallback = function(slide) ...@@ -3626,11 +3626,11 @@ asc_docs_api.prototype.sync_slidePropCallback = function(slide)
} }
obj.Timing = slide.timing; obj.Timing = slide.timing;
obj.lockDelete = !(slide.deleteLock.Type === locktype_Mine || slide.deleteLock.Type === locktype_None); obj.lockDelete = !(slide.deleteLock.Lock.Type === locktype_Mine || slide.deleteLock.Lock.Type === locktype_None);
obj.lockLayout = !(slide.layoutLock.Type === locktype_Mine || slide.layoutLock.Type === locktype_None); obj.lockLayout = !(slide.layoutLock.Lock.Type === locktype_Mine || slide.layoutLock.Lock.Type === locktype_None);
obj.lockTiming = !(slide.timingLock.Type === locktype_Mine || slide.timingLock.Type === locktype_None); obj.lockTiming = !(slide.timingLock.Lock.Type === locktype_Mine || slide.timingLock.Lock.Type === locktype_None);
obj.lockTranzition = !(slide.transitionLock.Type === locktype_Mine || slide.transitionLock.Type === locktype_None); obj.lockTranzition = !(slide.transitionLock.Lock.Type === locktype_Mine || slide.transitionLock.Lock.Type === locktype_None);
obj.lockBackground = !(slide.backgroundLock.Type === locktype_Mine || slide.backgroundLock.Type === locktype_None); obj.lockBackground = !(slide.backgroundLock.Lock.Type === locktype_Mine || slide.backgroundLock.Lock.Type === locktype_None);
obj.lockRemove = obj.lockDelete || obj.lockRemove = obj.lockDelete ||
obj.lockLayout || obj.lockLayout ||
obj.lockTiming || obj.lockTiming ||
......
...@@ -205,6 +205,15 @@ ...@@ -205,6 +205,15 @@
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/Editor/States.js"></script> <script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/Editor/States.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/Editor/Format/Chart.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/Editor/Format/ChartLayout.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/Editor/Format/ChartLegend.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/Editor/Format/ChartTitle.js"></script>
......
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