Commit ebc83beb 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@50069 954022d7-b5bf-4e40-9824-e11837661b57
parent 70a0fb2a
...@@ -2249,6 +2249,10 @@ CChartAsGroup.prototype = ...@@ -2249,6 +2249,10 @@ CChartAsGroup.prototype =
} }
} }
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this; editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
if(!this.parent)
{
delete editor.WordControl.m_oLogicDocument.recalcMap[this.Id];
}
}, },
Redo: function(data) Redo: function(data)
......
...@@ -86,6 +86,10 @@ CGroupShape.prototype = ...@@ -86,6 +86,10 @@ CGroupShape.prototype =
recalculateCursorTypes: true, recalculateCursorTypes: true,
recalculateScaleCoefficients: true recalculateScaleCoefficients: true
}; };
for(var i = 0; i < this.spTree.length; ++i)
{
this.spTree[i].recalcAll();
}
}, },
recalcAllColors: function() recalcAllColors: function()
......
This diff is collapsed.
...@@ -181,6 +181,7 @@ CShape.prototype = ...@@ -181,6 +181,7 @@ CShape.prototype =
recalculateGroupHierarchy: true, recalculateGroupHierarchy: true,
recalculateTextStyles: [true, true, true, true, true, true, true, true, true] recalculateTextStyles: [true, true, true, true, true, true, true, true, true]
}; };
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
}, },
recalcAllColors: function() recalcAllColors: function()
......
...@@ -1053,6 +1053,8 @@ Slide.prototype = ...@@ -1053,6 +1053,8 @@ Slide.prototype =
{ {
this.cSld.spTree[i].recalcAll(); this.cSld.spTree[i].recalcAll();
} }
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
}, },
recalcAllColors: function() recalcAllColors: function()
...@@ -1259,67 +1261,70 @@ Slide.prototype = ...@@ -1259,67 +1261,70 @@ Slide.prototype =
alignLeft : function() alignLeft : function()
{ {
for(var i = 0; i < this.selectedObjects.length; ++i) var selected_objects = this.graphicObjects.selectedObjects;
for(var i = 0; i < selected_objects.length; ++i)
{ {
this.selectedObjects[i].setXfrm(0, this.selectedObjects[i].y, null, null, null, null, null); selected_objects[i].setXfrm(0, selected_objects[i].y, null, null, null, null, null);
} }
}, },
alignRight : function() alignRight : function()
{ {
for(var i = 0; i < this.selectedObjects.length; ++i) var selected_objects = this.graphicObjects.selectedObjects;
for(var i = 0; i < selected_objects.length; ++i)
{ {
this.selectedObjects[i].setXfrm(this.Width - this.selectedObjects[i].extX, this.selectedObjects[i].y, null, null, null, null, null); selected_objects[i].setXfrm(this.Width - selected_objects[i].extX, selected_objects[i].y, null, null, null, null, null);
} }
}, },
alignTop : function() alignTop : function()
{ {
for(var i = 0; i < this.selectedObjects.length; ++i) for(var i = 0; i < this.graphicObjects.selectedObjects.length; ++i)
{ {
this.selectedObjects[i].setXfrm(this.selectedObjects[i].x, 0, null, null, null, null, null); this.graphicObjects.selectedObjects[i].setXfrm(this.graphicObjects.selectedObjects[i].x, 0, null, null, null, null, null);
} }
}, },
alignBottom : function() alignBottom : function()
{ {
for(var i = 0; i < this.selectedObjects.length; ++i) for(var i = 0; i < this.graphicObjects.selectedObjects.length; ++i)
{ {
this.selectedObjects[i].setXfrm(this.selectedObjects[i].x, this.Height - this.selectedObjects[i].extY, null, null, null, null, null); this.graphicObjects.selectedObjects[i].setXfrm(this.graphicObjects.selectedObjects[i].x, this.Height - this.graphicObjects.selectedObjects[i].extY, null, null, null, null, null);
} }
}, },
alignCenter : function() alignCenter : function()
{ {
for(var i = 0; i < this.selectedObjects.length; ++i) for(var i = 0; i < this.graphicObjects.selectedObjects.length; ++i)
{ {
this.selectedObjects[i].setXfrm((this.Width - this.selectedObjects[i].extX)*0.5, this.selectedObjects[i].y, null, null, null, null, null); this.graphicObjects.selectedObjects[i].setXfrm((this.Width - this.graphicObjects.selectedObjects[i].extX)*0.5, this.graphicObjects.selectedObjects[i].y, null, null, null, null, null);
} }
}, },
alignMiddle : function() alignMiddle : function()
{ {
for(var i = 0; i < this.selectedObjects.length; ++i) for(var i = 0; i < this.graphicObjects.selectedObjects.length; ++i)
{ {
this.selectedObjects[i].setXfrm( this.selectedObjects[i].x, (this.Height - this.selectedObjects[i].extY)*0.5, null, null, null, null, null); this.graphicObjects.selectedObjects[i].setXfrm(this.graphicObjects.selectedObjects[i].x, (this.Height - this.graphicObjects.selectedObjects[i].extY)*0.5, null, null, null, null, null);
} }
}, },
distributeHor : function() distributeHor : function()
{ {
for(var i = 0; i < this.selectedObjects.length; ++i) for(var i = 0; i < this.graphicObjects.selectedObjects.length; ++i)
{ {
this.selectedObjects[i].setXfrm((this.Width - this.selectedObjects[i].extX)*0.5, this.selectedObjects[i].y, null, null, null, null, null); this.graphicObjects.selectedObjects[i].setXfrm((this.Width - this.graphicObjects.selectedObjects[i].extX)*0.5, this.graphicObjects.selectedObjects[i].y, null, null, null, null, null);
} }
}, },
distributeVer : function() distributeVer : function()
{ {
for(var i = 0; i < this.selectedObjects.length; ++i) for(var i = 0; i < this.graphicObjects.selectedObjects.length; ++i)
{ {
this.selectedObjects[i].setXfrm( this.selectedObjects[i].x, (this.Height - this.selectedObjects[i].extY)*0.5, null, null, null, null, null); this.graphicObjects.selectedObjects[i].setXfrm( this.graphicObjects.selectedObjects[i].x, (this.Height - this.graphicObjects.selectedObjects[i].extY)*0.5, null, null, null, null, null);
} }
}, },
...@@ -1342,7 +1347,7 @@ Slide.prototype = ...@@ -1342,7 +1347,7 @@ Slide.prototype =
this.removeSelectedObjects(); this.removeSelectedObjects();
for(i = 0; i < selected.length; ++i) for(i = 0; i < selected.length; ++i)
{ {
this.addSp(selected[i]); this.addToSpTreeToPos(sp_tree.length, selected[i]);
} }
break; break;
} }
......
...@@ -381,6 +381,14 @@ MasterSlide.prototype = ...@@ -381,6 +381,14 @@ MasterSlide.prototype =
this.recalcAll(); this.recalcAll();
}, },
recalcAll: function()
{
for(var i = 0; i < this.cSld.spTree.length; ++i)
{
this.cSld.spTree[i].recalcAll();
}
},
Get_Id: function() Get_Id: function()
{ {
return this.Id; return this.Id;
......
...@@ -1617,9 +1617,8 @@ CGraphicObjects.prototype = { ...@@ -1617,9 +1617,8 @@ CGraphicObjects.prototype = {
{ {
var chart = new CChartAsGroup(this.slide); var chart = new CChartAsGroup(this.slide);
chart.initFromBinary(binary); chart.initFromBinary(binary);
this.slide.addSp(chart); this.slide.addToSpTreeToPos(this.slide.cSld.spTree, chart);
editor.WordControl.m_oLogicDocument.recalcMap[chart.Id] = chart; editor.WordControl.m_oLogicDocument.recalcMap[chart.Id] = chart;
}, },
editChart: function(binary) editChart: function(binary)
......
...@@ -2806,7 +2806,7 @@ function GroupState(drawingObjectsController, drawingObjects, group) ...@@ -2806,7 +2806,7 @@ function GroupState(drawingObjectsController, drawingObjects, group)
this.drawingObjectsController.addPreTrackObject(selected_objects[j].createMoveTrack()); this.drawingObjectsController.addPreTrackObject(selected_objects[j].createMoveTrack());
} }
this.drawingObjectsController.changeCurrentState(new PreMoveState(this.drawingObjectsController, this.drawingObjects,x, y, e.ShiftKey, e.ctrl, cur_drawing, false, true)); this.drawingObjectsController.changeCurrentState(new PreMoveState(this.drawingObjectsController, this.drawingObjects,x, y, e.ShiftKey, e.ctrl, cur_drawing, false, true));
this.drawingObjectsController.OnUpdateOverlay(); editor.WordControl.OnUpdateOverlay();
return; return;
} }
else if(hit_in_text_rect) else if(hit_in_text_rect)
......
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