Commit 967c1578 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

убрала Resize, setPosition и UpdatePosition (for Edit)


git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52813 954022d7-b5bf-4e40-9824-e11837661b57
parent 14481e06
...@@ -375,8 +375,6 @@ CControlComposition.prototype = ...@@ -375,8 +375,6 @@ CControlComposition.prototype =
CreateEquation: function(indef) CreateEquation: function(indef)
{ {
this.Content[this.CurPos].CreateEquation(indef); this.Content[this.CurPos].CreateEquation(indef);
this.Content[this.CurPos].RecalculateReverse(oMeasure);
this.Content[this.CurPos].UpdatePosition();
}, },
Paragraph_Add: function(TextPr) Paragraph_Add: function(TextPr)
{ {
...@@ -415,14 +413,6 @@ CControlComposition.prototype = ...@@ -415,14 +413,6 @@ CControlComposition.prototype =
{ {
this.Content[this.CurPos].Refresh(); this.Content[this.CurPos].Refresh();
}, },
old_Set_SelectionState: function(State)
{
this.Content[this.CurPos].Set_SelectionState(State);
},
old_Get_SelectionState: function()
{
return this.Content[this.CurPos].Get_SelectionState();
},
UpdateCursor: function() UpdateCursor: function()
{ {
this.Content[this.CurPos].UpdateCursor(); this.Content[this.CurPos].UpdateCursor();
...@@ -1268,7 +1258,7 @@ function Set_Container(dimension, path, index) ...@@ -1268,7 +1258,7 @@ function Set_Container(dimension, path, index)
document.getElementById("Container").style.display = "none"; document.getElementById("Container").style.display = "none";
// AddMathComponent -> CreateEquation // AddMathComponent -> CreateEquation
//MathControl.CreateEquation(index + _i*column + _j); //MathControl.CreateEquation(index + _i*column + _j);
MathComposition.CreateEquation(index + _i*column + _j); MathComposition.CreateEquation2(index + _i*column + _j);
editor.WordControl.m_oLogicDocument.DrawingDocument.OnRecalculatePage(0, { Width : Page_Width, Height : Page_Height, Margins : { editor.WordControl.m_oLogicDocument.DrawingDocument.OnRecalculatePage(0, { Width : Page_Width, Height : Page_Height, Margins : {
Left : X_Left_Field, Left : X_Left_Field,
Right : X_Right_Field, Right : X_Right_Field,
......
...@@ -521,10 +521,6 @@ CMathBase.prototype = ...@@ -521,10 +521,6 @@ CMathBase.prototype =
return content; return content;
}, },
drawSelect: function()
{
this.elements[this.CurPos_X][this.CurPos_Y].drawSelect();
},
cursor_MoveToStartPos: function() // home => cursor_MoveToStartPos cursor_MoveToStartPos: function() // home => cursor_MoveToStartPos
{ {
this.CurPos_X = 0; this.CurPos_X = 0;
...@@ -873,11 +869,11 @@ CMathBase.prototype = ...@@ -873,11 +869,11 @@ CMathBase.prototype =
this.size = {width: _width, height: _height, center: _center}; this.size = {width: _width, height: _height, center: _center};
}, },
RecalculateReverse: function(oMeasure) /*RecalculateReverse: function(oMeasure)
{ {
this.recalculateSize(); this.recalculateSize();
this.Parent.RecalculateReverse(oMeasure); this.Parent.RecalculateReverse(oMeasure);
}, },*/
Resize: function(oMeasure) Resize: function(oMeasure)
{ {
for(var i=0; i < this.nRow; i++) for(var i=0; i < this.nRow; i++)
......
...@@ -1332,7 +1332,7 @@ CDocument.prototype = ...@@ -1332,7 +1332,7 @@ CDocument.prototype =
this.Document_UpdateRulersState(); this.Document_UpdateRulersState();
//** //**
//MathControl.UpdateCursor(); //MathControl.UpdateCursor();
MathComposition.UpdateCursor(); MathComposition.UpdateCursor2();
//this.RecalculateCurPos(); //this.RecalculateCurPos();
//** //**
//this.RecalculateCurPos(); //this.RecalculateCurPos();
......
...@@ -7,8 +7,6 @@ function CFraction() ...@@ -7,8 +7,6 @@ function CFraction()
extend(CFraction, CMathBase); extend(CFraction, CMathBase);
CFraction.prototype.init = function(props) CFraction.prototype.init = function(props)
{ {
if (props.type == undefined)
props.type = BAR_FRACTION;
var bValid = typeof(props.type) !== "undefined" && props.type !== null; var bValid = typeof(props.type) !== "undefined" && props.type !== null;
if(bValid) if(bValid)
...@@ -576,7 +574,7 @@ old_CBarFraction.prototype.setSimple = function(flag) ...@@ -576,7 +574,7 @@ old_CBarFraction.prototype.setSimple = function(flag)
else else
this.setReduct(1); this.setReduct(1);
this./**/Resize(); this.Resize();
} }
////////// //////////
......
This diff is collapsed.
...@@ -184,7 +184,7 @@ CMathText.prototype = ...@@ -184,7 +184,7 @@ CMathText.prototype =
this.size = {width: _width, widthG: widthG, height: _height, center: _center, ascent: _ascent, descent: _descent}; this.size = {width: _width, widthG: widthG, height: _height, center: _center, ascent: _ascent, descent: _descent};
}, },
resize: function(oMeasure) Resize: function(oMeasure)
{ {
var letter = this.getCode(); var letter = this.getCode();
...@@ -341,10 +341,6 @@ CMathText.prototype = ...@@ -341,10 +341,6 @@ CMathText.prototype =
this.size.center = this.size.center*(this.transform.sy + this.transform.shy);*/ this.size.center = this.size.center*(this.transform.sy + this.transform.shy);*/
}, },
Resize: function(oMeasure)
{
this.resize(oMeasure);
},
IsJustDraw: function() IsJustDraw: function()
{ {
return this.bJDraw; return this.bJDraw;
......
...@@ -2533,14 +2533,14 @@ COperator.prototype.getProps = function(props, defaultProps) ...@@ -2533,14 +2533,14 @@ COperator.prototype.getProps = function(props, defaultProps)
this.defaultType = defaultProps.type; this.defaultType = defaultProps.type;
var bDelimiter = this.type == OPER_DELIMITER || this.type == OPER_SEPARATOR, var bDelimiter = this.type == OPER_DELIMITER || this.type == OPER_SEPARATOR,
bType = typeof(props.type)!=="undefined" && props.type !== null, bNotType = typeof(props.type)=="undefined" || props.type == null,
bEmptyStr = typeof(chr) === "string" && chr.length == 0, bEmptyStr = typeof(chr) === "string" && chr.length == 0,
bCode = typeof(chr) === "string" && chr.length > 0; bCode = typeof(chr) === "string" && chr.length > 0;
var code = bCode ? chr.charCodeAt(0) : null; var code = bCode ? chr.charCodeAt(0) : null;
var bDPrpDelim = bDelimiter && !bType && bEmptyStr, var bDPrpDelim = bDelimiter && bNotType && bEmptyStr,
bDPrpOther = !bDelimiter && !bType && !bCode; bDPrpOther = !bDelimiter && bNotType && !bCode;
if(bDPrpDelim || bDPrpOther) if(bDPrpDelim || bDPrpOther)
{ {
...@@ -2722,15 +2722,6 @@ CDelimiter.prototype.init = function(props) ...@@ -2722,15 +2722,6 @@ CDelimiter.prototype.init = function(props)
else if(props.grow == false || props.grow == 0) else if(props.grow == false || props.grow == 0)
this.grow = false; this.grow = false;
if(props.begChr == undefined)
props.begChrType = PARENTHESIS_LEFT;
if(props.endChr == undefined)
props.endChrType = PARENTHESIS_RIGHT;
if(props.endChr == undefined && props.column >1)
props.sepChrType = DELIMITER_LINE;
var begPrp = var begPrp =
{ {
chr: props.begChr, chr: props.begChr,
...@@ -3253,7 +3244,7 @@ CGroupCharacter.prototype.init = function(props) ...@@ -3253,7 +3244,7 @@ CGroupCharacter.prototype.init = function(props)
/*this.setOperator(new COperator(glyph));*/ /*this.setOperator(new COperator(glyph));*/
if(this.operator.IsArrow()) if(this.operator.IsArrow())
this.setReduct(DEGR_REDUCT); /// заменить впоследствии на более подходящую функцию this.setReduct(DEGR_REDUCT);
} }
CGroupCharacter.prototype.getCenter = function() CGroupCharacter.prototype.getCenter = function()
{ {
......
...@@ -18,7 +18,7 @@ function simulatorMComposition( MComposition, ttype) ...@@ -18,7 +18,7 @@ function simulatorMComposition( MComposition, ttype)
props = props =
{ {
type: BAR_FRACTION //type: BAR_FRACTION
}; };
var fract = new CFraction(); var fract = new CFraction();
addToContent_ForRead(accent.getBase(), fract, props); addToContent_ForRead(accent.getBase(), fract, props);
...@@ -52,10 +52,13 @@ function simulatorMComposition( MComposition, ttype) ...@@ -52,10 +52,13 @@ function simulatorMComposition( MComposition, ttype)
props = props =
{ {
begChrType: PARENTHESIS_LEFT, begChr: "",
endChr: "",
sepChr: "",
//begChrType: PARENTHESIS_LEFT,
//endChrType: PARENTHESIS_RIGHT, //endChrType: PARENTHESIS_RIGHT,
endChr: ")", //endChr: ")",
sepChrType: DELIMITER_LINE, //sepChrType: DELIMITER_LINE,
column: 2 column: 2
}; };
...@@ -230,7 +233,7 @@ function simulatorMComposition( MComposition, ttype) ...@@ -230,7 +233,7 @@ function simulatorMComposition( MComposition, ttype)
lastElem.addTxt("w"); lastElem.addTxt("w");
var oper = new CGroupCharacter(); /*var oper = new CGroupCharacter();
props = props =
{ {
chrType: DOUBLE_ARROW_LR, chrType: DOUBLE_ARROW_LR,
...@@ -239,7 +242,7 @@ function simulatorMComposition( MComposition, ttype) ...@@ -239,7 +242,7 @@ function simulatorMComposition( MComposition, ttype)
addToContent_ForRead(lastElem, oper, props); addToContent_ForRead(lastElem, oper, props);
oper.getBase().addTxt("a"); oper.getBase().addTxt("a");*/
lastElem.addTxt("y"); lastElem.addTxt("y");
......
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