Commit 2c62bc63 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

undo / redo

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48909 954022d7-b5bf-4e40-9824-e11837661b57
parent 013e204f
......@@ -414,9 +414,13 @@ CControlComposition.prototype =
{
this.Content[this.CurPos].Refresh();
},
Set_SelectionState: function()
Set_SelectionState: function(State)
{
this.Content[this.CurPos].Set_SelectionState(State);
},
Get_SelectionState: function()
{
return this.Content[this.CurPos].Get_SelectionState();
}
}
var MathControl = new CControlComposition();
......
......@@ -56,7 +56,8 @@ CMathBase.prototype =
{
this.elements[i][j] = new CMathContent();
this.elements[i][j].relate(this);
this.elements[i][j].setComposition(this.Composition);
if( !this.elements[i][j].IsJustDraw())
this.elements[i][j].setComposition(this.Composition);
this.elements[i][j].setTxtPrp(this.TxtPrp);
//this.elements[i][j].setReduct(this.reduct);
//this.elements[i][j].setRunPrp(this.RunPrp);
......@@ -900,5 +901,33 @@ CMathBase.prototype =
for(var j = 0; j < this.nCol; j++)
if(!this.elements[i][j].IsJustDraw())
this.elements[i][j].setTxtPrp(txtPrp);
},
getRealPosition: function()
{
var pos = this.elements[this.CurPos_X][this.CurPos_Y].getRealPosition();
var WH = this.getWidthsHeights();
for(var j = 0; j < this.CurPos_Y; j++)
pos.Y += WH.heights[j];
for(var i = 0; i < this.CurPos_X; i++)
pos.X += WH.widths[i];
return pos;
},
getRealPosition_2: function()
{
var pos = this.elements[this.CurPos_X][this.CurPos_Y].getRealPosition_2();
var WH = this.getWidthsHeights();
for(var j = 0; j < this.CurPos_Y; j++)
pos.Y += WH.heights[j];
for(var i = 0; i < this.CurPos_X; i++)
pos.X += WH.widths[i];
return pos;
}
}
......@@ -9143,7 +9143,7 @@ CDocument.prototype =
this.Document_UpdateInterfaceState();
},
Get_SelectionState : function()
/*Get_SelectionState : function()
{
var DocState = new Object();
DocState.CurPos =
......@@ -9212,9 +9212,13 @@ CDocument.prototype =
State.push( DocState );
return State;
},
},*/
//**
Get_SelectionState : function()
{
return MathControl.Get_SelectionState();
},
Set_SelectionState : function(State)
{
MathControl.Set_SelectionState(State);
......
This diff is collapsed.
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