Commit 974fcb99 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@50167 954022d7-b5bf-4e40-9824-e11837661b57
parent a20d7c5d
...@@ -6732,7 +6732,7 @@ CDocumentContent.prototype = ...@@ -6732,7 +6732,7 @@ CDocumentContent.prototype =
History.Add(g_oUndoRedoGraphicObjects, historyitem_DocumentContent_AddItem, null, null, new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataDocContentAddItem(Position, NewObject.Get_Id()))); History.Add(g_oUndoRedoGraphicObjects, historyitem_DocumentContent_AddItem, null, null, new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataDocContentAddItem(Position, NewObject.Get_Id())));
this.Content.splice( Position, 0, NewObject ); this.Content.splice( Position, 0, NewObject );
NewObject.Set_Parent( this ); NewObject.setParent( this );
NewObject.Set_DocumentNext( NextObj ); NewObject.Set_DocumentNext( NextObj );
NewObject.Set_DocumentPrev( PrevObj ); NewObject.Set_DocumentPrev( PrevObj );
......
...@@ -1861,6 +1861,7 @@ CGs.prototype = ...@@ -1861,6 +1861,7 @@ CGs.prototype =
this.pos = Reader.GetLong(); this.pos = Reader.GetLong();
}, },
IsIdentical : function(fill) IsIdentical : function(fill)
{ {
return false; return false;
...@@ -1978,6 +1979,19 @@ function GradLin() ...@@ -1978,6 +1979,19 @@ function GradLin()
GradLin.prototype = GradLin.prototype =
{ {
Write_ToBinary2 : function(Writer)
{
Writer.WriteLong(this.angle);
Writer.WriteBool(this.scale);
},
Read_FromBinary2 : function(Reader)
{
this.angle = Reader.GetLong();
this.scale = Reader.GetBool();
},
Get_Id: function() Get_Id: function()
{ {
return this.Id; return this.Id;
...@@ -2072,6 +2086,15 @@ function GradPath() ...@@ -2072,6 +2086,15 @@ function GradPath()
} }
GradPath.prototype = GradPath.prototype =
{ {
Write_ToBinary2 : function(Writer)
{
},
Read_FromBinary2 : function(Reader)
{
},
IsIdentical : function(path) IsIdentical : function(path)
{ {
if (this.path != path.path) if (this.path != path.path)
...@@ -2109,6 +2132,50 @@ function CGradFill() ...@@ -2109,6 +2132,50 @@ function CGradFill()
CGradFill.prototype = CGradFill.prototype =
{ {
Write_ToBinary2 : function(Writer)
{
Writer.WriteLong(this.type);
var colors_count = this.colors.length;
Writer.WriteLong(colors_count);
for(var i = 0; i < colors_count; ++i)
{
this.colors[i].Write_ToBinary2(Writer);
}
Writer.WriteBool(isRealObject(this.lin));
if(isRealObject(this.lin))
{
this.lin.Write_ToBinary2(Writer);
}
Writer.WriteBool(isRealObject(this.path));
if(isRealObject(this.path))
{
this.path.Write_ToBinary2(Writer);
}
},
Read_FromBinary2 : function(Reader)
{
var colors_count = Reader.GetLong();
for(var i = 0; i< colors_count; ++i)
{
this.colors[i] = new CGs();
this.colors[i].Read_FromBinary2(Reader);
}
if(Reader.GetBool())
{
this.lin = new GradLin();
this.lin.Read_FromBinary2(Reader);
}
if(Reader.GetBool())
{
this.path = new GradPath();
this.path.Read_FromBinary2(Reader);
}
},
Get_Id: function() Get_Id: function()
{ {
return this.Id; return this.Id;
......
...@@ -8463,11 +8463,11 @@ Paragraph.prototype = ...@@ -8463,11 +8463,11 @@ Paragraph.prototype =
return; return;
// Если стиль является стилем по умолчанию для параграфа, тогда не надо его записывать. // Если стиль является стилем по умолчанию для параграфа, тогда не надо его записывать.
if ( Id != this.Parent.Get_Styles().Get_Default_Paragraph() ) /*if ( Id != this.Parent.Get_Styles().Get_Default_Paragraph() )
{ {
History.Add( this, { Type : historyitem_Paragraph_PStyle, Old : Id_old, New : Id } ); History.Add( this, { Type : historyitem_Paragraph_PStyle, Old : Id_old, New : Id } );
this.Pr.PStyle = Id; this.Pr.PStyle = Id;
} } */
// Надо пересчитать конечный стиль // Надо пересчитать конечный стиль
this.CompiledPr.NeedRecalc = true; this.CompiledPr.NeedRecalc = true;
...@@ -8526,7 +8526,7 @@ Paragraph.prototype = ...@@ -8526,7 +8526,7 @@ Paragraph.prototype =
{ {
if ( undefined != this.Pr.PStyle ) if ( undefined != this.Pr.PStyle )
{ {
History.Add( this, { Type : historyitem_Paragraph_PStyle, Old : this.Pr.PStyle, New : undefined } ); //History.Add( this, { Type : historyitem_Paragraph_PStyle, Old : this.Pr.PStyle, New : undefined } );
this.Pr.PStyle = undefined; this.Pr.PStyle = undefined;
} }
......
...@@ -2810,6 +2810,8 @@ CShape.prototype = ...@@ -2810,6 +2810,8 @@ CShape.prototype =
case historyitem_AutoShapes_RecalculateAfterInit: case historyitem_AutoShapes_RecalculateAfterInit:
{ {
this.recalculateTransform(); this.recalculateTransform();
this.calculateContent();
this.calculateTransformTextMatrix();
this.recalculateBrush(); this.recalculateBrush();
this.recalculatePen(); this.recalculatePen();
break; break;
......
...@@ -4486,7 +4486,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4486,7 +4486,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
state.textObject.remove(-1, true); state.textObject.remove(-1, true);
...@@ -4509,7 +4509,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4509,7 +4509,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
...@@ -4520,7 +4520,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4520,7 +4520,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
selected_objects.push(group.selectedObjects[i]); selected_objects.push(group.selectedObjects[i]);
} }
group.resetSelection(); group.resetSelection();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateUndo, null, null, History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateUndo, null, null,
new UndoRedoDataGraphicObjects(group.Id, new UndoRedoDataGOSingleProp(null, null)), null); new UndoRedoDataGraphicObjects(group.Id, new UndoRedoDataGOSingleProp(null, null)), null);
var groups = []; var groups = [];
...@@ -4614,14 +4614,14 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4614,14 +4614,14 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i) for(var i = drawingObjectsController.selectedObjects.length-1; i > -1 ; --i)
{ {
drawingObjectsController.selectedObjects[i].deleteDrawingBase(); drawingObjectsController.selectedObjects[i].deleteDrawingBase();
} }
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.drawingObjects.showDrawingObjects(true); drawingObjectsController.drawingObjects.showDrawingObjects(true);
drawingObjectsController.updateSelectionState(drawingObjectsController.drawingObjects.drawingDocument); drawingObjectsController.updateSelectionState(drawingObjectsController.drawingObjects.drawingDocument);
//drawingObjectsController.drawingObjects.OnUpdateOverlay(); //drawingObjectsController.drawingObjects.OnUpdateOverlay();
...@@ -4659,7 +4659,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4659,7 +4659,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
state.textObject.paragraphAdd( new ParaTab() ); state.textObject.paragraphAdd( new ParaTab() );
drawingObjectsController.drawingObjects.showDrawingObjects(true); drawingObjectsController.drawingObjects.showDrawingObjects(true);
...@@ -4848,7 +4848,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4848,7 +4848,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var sp = drawingObjectsController.selectedObjects[0]; var sp = drawingObjectsController.selectedObjects[0];
drawingObjectsController.changeCurrentState(new TextAddState(drawingObjectsController, drawingObjectsController.drawingObjects, sp)); drawingObjectsController.changeCurrentState(new TextAddState(drawingObjectsController, drawingObjectsController.drawingObjects, sp));
...@@ -4884,7 +4884,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4884,7 +4884,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
state.textObject.addNewParagraph(); state.textObject.addNewParagraph();
...@@ -4948,7 +4948,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4948,7 +4948,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
state.textObject.paragraphAdd(new ParaSpace(1)); state.textObject.paragraphAdd(new ParaSpace(1));
...@@ -4974,7 +4974,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4974,7 +4974,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
drawingObjectsController.changeCurrentState(new TextAddInGroup(drawingObjectsController, drawingObjectsController.drawingObjects, state.group, state.group.selectedObjects[0])); drawingObjectsController.changeCurrentState(new TextAddInGroup(drawingObjectsController, drawingObjectsController.drawingObjects, state.group, state.group.selectedObjects[0]));
...@@ -4999,7 +4999,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4999,7 +4999,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
drawingObjectsController.changeCurrentState(new TextAddState(drawingObjectsController, drawingObjectsController.drawingObjects, drawingObjectsController.selectedObjects[0])); drawingObjectsController.changeCurrentState(new TextAddState(drawingObjectsController, drawingObjectsController.drawingObjects, drawingObjectsController.selectedObjects[0]));
drawingObjectsController.curState.textObject.paragraphAdd(new ParaSpace(1)); drawingObjectsController.curState.textObject.paragraphAdd(new ParaSpace(1));
...@@ -5090,7 +5090,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5090,7 +5090,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i) for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i)
...@@ -5122,7 +5122,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5122,7 +5122,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(state.group.Id, new UndoRedoDataShapeRecalc()), null); History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(state.group.Id, new UndoRedoDataShapeRecalc()), null);
...@@ -5171,7 +5171,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5171,7 +5171,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i) for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i)
...@@ -5203,7 +5203,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5203,7 +5203,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(state.group.Id, new UndoRedoDataShapeRecalc()), null); History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(state.group.Id, new UndoRedoDataShapeRecalc()), null);
...@@ -5252,7 +5252,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5252,7 +5252,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i) for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i)
...@@ -5284,7 +5284,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5284,7 +5284,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(state.group.Id, new UndoRedoDataShapeRecalc()), null); History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(state.group.Id, new UndoRedoDataShapeRecalc()), null);
...@@ -5333,7 +5333,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5333,7 +5333,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i) for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i)
...@@ -5365,7 +5365,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5365,7 +5365,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(state.group.Id, new UndoRedoDataShapeRecalc()), null); History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(state.group.Id, new UndoRedoDataShapeRecalc()), null);
...@@ -5419,7 +5419,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5419,7 +5419,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
state.textObject.remove(1, true); state.textObject.remove(1, true);
...@@ -5442,7 +5442,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5442,7 +5442,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
...@@ -5453,7 +5453,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5453,7 +5453,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
selected_objects.push(group.selectedObjects[i]); selected_objects.push(group.selectedObjects[i]);
} }
group.resetSelection(); group.resetSelection();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateUndo, null, null, History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateUndo, null, null,
new UndoRedoDataGraphicObjects(group.Id, new UndoRedoDataGOSingleProp(null, null)), null); new UndoRedoDataGraphicObjects(group.Id, new UndoRedoDataGOSingleProp(null, null)), null);
var groups = []; var groups = [];
...@@ -5555,14 +5555,14 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5555,14 +5555,14 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i) for(var i = drawingObjectsController.selectedObjects.length-1; i >-1 ; --i)
{ {
drawingObjectsController.selectedObjects[i].deleteDrawingBase(); drawingObjectsController.selectedObjects[i].deleteDrawingBase();
} }
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.drawingObjects.showDrawingObjects(true); drawingObjectsController.drawingObjects.showDrawingObjects(true);
drawingObjectsController.updateSelectionState(drawingObjectsController.drawingObjects.drawingDocument); drawingObjectsController.updateSelectionState(drawingObjectsController.drawingObjects.drawingDocument);
//drawingObjectsController.drawingObjects.OnUpdateOverlay(); //drawingObjectsController.drawingObjects.OnUpdateOverlay();
...@@ -5803,7 +5803,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5803,7 +5803,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
state.textObject.paragraphAdd(Item); state.textObject.paragraphAdd(Item);
...@@ -5829,7 +5829,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5829,7 +5829,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
var state = drawingObjectsController.curState; var state = drawingObjectsController.curState;
drawingObjectsController.changeCurrentState(new TextAddInGroup(drawingObjectsController, drawingObjectsController.drawingObjects, state.group, state.group.selectedObjects[0])); drawingObjectsController.changeCurrentState(new TextAddInGroup(drawingObjectsController, drawingObjectsController.drawingObjects, state.group, state.group.selectedObjects[0]));
...@@ -5854,7 +5854,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5854,7 +5854,7 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
if(bLock) if(bLock)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
drawingObjectsController.resetSelectionState(); drawingObjectsController.resetSelectionState2();
drawingObjectsController.setSelectionState(selection_state); drawingObjectsController.setSelectionState(selection_state);
drawingObjectsController.changeCurrentState(new TextAddState(drawingObjectsController, drawingObjectsController.drawingObjects, drawingObjectsController.selectedObjects[0])); drawingObjectsController.changeCurrentState(new TextAddState(drawingObjectsController, drawingObjectsController.drawingObjects, drawingObjectsController.selectedObjects[0]));
drawingObjectsController.curState.textObject.paragraphAdd(Item); drawingObjectsController.curState.textObject.paragraphAdd(Item);
......
...@@ -1765,6 +1765,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack) ...@@ -1765,6 +1765,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateUndo, null, null, History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateUndo, null, null,
new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null))); new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
this.original.normalize();
this.original.setPosition(this.x, this.y); 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);
...@@ -1774,7 +1775,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack) ...@@ -1774,7 +1775,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
this.childs[i].trackEnd(); this.childs[i].trackEnd();
} }
if(this.parentTrack == null) if(this.parentTrack == null)
this.original.recalculate(); this.original.recalculateTransform();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateRedo, null, null, History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_GroupRecalculateRedo, null, null,
new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null))); new UndoRedoDataGraphicObjects(this.originalObject.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
......
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