Commit 416a2ffa authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

изменила properties для чтения

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50688 954022d7-b5bf-4e40-9824-e11837661b57
parent 41a3aa17
......@@ -545,7 +545,7 @@ CSign.prototype.setSign = function(props)
}
else
{
this.type = MATH_TEXT;
this.type = ACCENT_TEXT;
this.sign.add(sign.code);
}
}
......
......@@ -41,7 +41,7 @@ CBorderBox.prototype.init = function(props)
if(props.strikeV === true || props.strikeV === 1)
this.bVert = true;
}
this.setDimension(1, 1);
this.setContent();
}
......@@ -272,17 +272,14 @@ function CBox()
extend(CBox, CMathBase);
CBox.prototype.init = function(props)
{
if( typeof(props) !== "undefined" && (props !== null) )
{
if(props.opEmu === true || props.opEmu === 1)
this.opEmu = true;
if(props.opEmu === true || props.opEmu === 1)
this.opEmu = true;
if(props.diff === true || props.diff === 1)
this.diff = true;
if(props.diff === true || props.diff === 1)
this.diff = true;
if(props.noBreak === true || props.noBreak === 1)
this.noBreak = true;
}
if(props.noBreak === true || props.noBreak === 1)
this.noBreak = true;
this.setDimension(1, 1);
this.setContent();
......@@ -300,9 +297,9 @@ function CBar()
extend(CBar, CCharacter);
CBar.prototype.init = function(props)
{
if(props.pos === "top" || props.location === LOCATION_TOP)
if(props.pos === LOCATION_TOP || props.location === LOCATION_TOP)
this.loc = LOCATION_TOP;
else if(props.pos === "bot" || props.location === LOCATION_BOT)
else if(props.pos === LOCATION_BOT || props.location === LOCATION_BOT)
this.loc = LOCATION_BOT;
var glyph = new COperatorLine();
......
......@@ -7,7 +7,7 @@ function CFraction()
extend(CFraction, CMathBase);
CFraction.prototype.init = function(props)
{
if( typeof(props.type) !== "undefined" || props.type !== null )
if( typeof(props.type) !== "undefined" && props.type !== null )
this.type = props.type;
else
this.type = BAR_FRACTION;
......
......@@ -2,12 +2,12 @@
//var NameFunctions = ["min", "max", "lim", "log", "ln", "sin", "cos", "tan", "ctg", "cosh", "sinh", "tanh", "cth", "sec", "csc", "cot", "csch", "sech", "coth"];
//var Diff = ["dx","dy","dθ"];
function CLogarithm()
function old_CLogarithm()
{
CSubMathBase.call(this,1,2);
}
extend(CLogarithm, CSubMathBase);
CLogarithm.prototype.setContent = function()
extend(old_CLogarithm, CSubMathBase);
old_CLogarithm.prototype.setContent = function()
{
var oBase = new CMathContent();
var GParams = Common_CopyObj(this.params);
......@@ -31,17 +31,17 @@ CLogarithm.prototype.setContent = function()
oArg.relate(this);
oArg.fillPlaceholders();
CLogarithm.superclass.setContent.call(this, oFunc, oArg);
old_CLogarithm.superclass.setContent.call(this, oFunc, oArg);
}
CLogarithm.prototype.getFunction = function()
old_CLogarithm.prototype.getFunction = function()
{
return this.elements[0][0].getBase();
}
CLogarithm.prototype.getBase = function()
old_CLogarithm.prototype.getBase = function()
{
return this.elements[0][0].getIterator();
}
CLogarithm.prototype.getArgument = function()
old_CLogarithm.prototype.getArgument = function()
{
return this.elements[0][1];
}
......@@ -57,7 +57,6 @@ CLimit.prototype.init = function(props)
this.setDimension(2, 1);
var oBase = new CMathContent();
oBase.setOwnTPrp({Italic: false});
var oIter = new CMathContent();
......
......@@ -108,9 +108,15 @@ var ACCENT_ARROW_RIGHT = 15;
var ACCENT_ARROW_LR = 16;
var ACCENT_HALF_ARROW_LEFT = 17;
var ACCENT_HALF_ARROW_RIGHT = 18;
var MATH_TEXT = 19;
var ACCENT_TEXT = 19;
var BASEJC_CENTER = 0;
var BASEJC_TOP = 1;
var BASEJC_BOTTOM = 2;
var MATH_TEXT = 0;
var MATH_RUN_PRP = 1;
var MATH_OBJS = 2;
var MATH_EMPTY = 3;
var MATH_PLACEHOLDER = 4;
var MATRIX_CENTER = 0;
var MATRIX_TOP = 1;
var MATRIX_BOTTOM = 2;
\ No newline at end of file
......@@ -20,7 +20,7 @@ function CMathMatrix()
};
this.plcHide = false;
this.baseJc = 0;
this.baseJc = BASEJC_CENTER;
this.gaps =
{
row: new Array(),
......@@ -40,7 +40,7 @@ CMathMatrix.prototype.init = function(props)
this.setDimension(props.row, props.column);
this.setContent();
if(typeof(props.baseJc) !== "undefined" && props.baseJc !== null)
/*if(typeof(props.baseJc) !== "undefined" && props.baseJc !== null)
{
if(props.baseJc === "center")
this.baseJc = MATRIX_CENTER;
......@@ -48,7 +48,14 @@ CMathMatrix.prototype.init = function(props)
this.baseJc = MATRIX_TOP;
else if(props.baseJc === "bottom")
this.baseJc = MATRIX_BOTTOM;
}
}*/
if(props.baseJc === BASEJC_CENTER)
this.baseJc = BASEJC_CENTER;
else if(props.baseJc === BASEJC_TOP)
this.baseJc = BASEJC_TOP;
else if(props.baseJc === BASEJC_BOTTOM)
this.baseJc = BASEJC_BOTTOM;
this.setRuleGap(this.spaceColumn, props.cGpRule, props.cGp, props.cSp);
this.setRuleGap(this.spaceRow, props.rSpRule, props.rSp);
......@@ -184,12 +191,12 @@ CMathMatrix.prototype.recalculateSize = function()
var center = 0;
if(this.baseJc == 1)
if(this.baseJc == BASEJC_TOP)
{
for(var j = 0; j < this.nCol; j++)
center = this.elements[0][j].size.center > center ? this.elements[0][j].size.center : center;
}
else if(this.baseJc == 2)
else if(this.baseJc == BASEJC_BOTTOM)
{
var descent = 0,
currDsc;
......@@ -358,6 +365,7 @@ CMathMatrix.prototype.addRow = function()
{
this.elements[this.nRow-1][j] = new CMathContent();
this.elements[this.nRow-1][j].relate(this);
this.elements[this.nRow-1][j].setComposition(this.Composition);
this.elements[this.nRow-1][j].setReduct(this.reduct);
//this.elements[this.nRow-1][j].setComposition(this.Composition);
}
......@@ -459,6 +467,38 @@ function CEqArray()
}
extend(CEqArray, CMathMatrix);
CEqArray.prototype.init = function(props)
{
var Pr =
{
column: 1,
row: props.row,
baseJc: BASEJC_CENTER,
rSpRule: 0,
rSp: 0,
maxDist: 0,
objDist: 0
}; // default
if(props.rSpRule !== "undefined" && props.rSpRule !== null)
Pr.rSpRule = props.rSpRule;
if(props.rSp !== "undefined" && props.rSp !== null)
Pr.rSp = props.rSp;
if(props.baseJc !== "undefined" && props.baseJc !== null)
Pr.baseJc = props.baseJc;
if(props.maxDist !== "undefined" && props.maxDist !== null)
Pr.maxDist = props.maxDist;
if(props.objDist !== "undefined" && props.objDist !== null)
Pr.objDist = props.objDist;
CEqArray.superclass.init.call(this, Pr);
}
CEqArray.prototype.old_init = function(props)
{
var prps =
{
......@@ -471,4 +511,8 @@ CEqArray.prototype.init = function(props)
};
CEqArray.superclass.init.call(this, prps);
}
CEqArray.prototype.getElement = function(num)
{
return this.elements[num][y];
}
\ No newline at end of file
......@@ -17,8 +17,8 @@ function CGlyphOperator()
this.penW = 1; // px
this.TxtPrp = new CMathTextPrp();
this.bGlyph = true;
//this.TxtPrp = new CMathTextPrp();
//this.bGlyph = true;
}
CGlyphOperator.prototype.init = function(props)
......@@ -3850,9 +3850,9 @@ function CDelimiter()
extend(CDelimiter, CSubMathBase);
CDelimiter.prototype.init = function(props)
{
if(props.grow == "1" || props.grow == true)
if(props.grow == true || props.grow == 1)
this.grow = true;
else if(props.grow == "0" || props.grow == false)
else if(props.grow == false || props.grow == 0)
this.grow = false;
else
this.grow = true;
......@@ -3871,9 +3871,9 @@ CDelimiter.prototype.init = function(props)
this.sepOper.setTxtPrp(tPrp);
this.endOper.setTxtPrp(tPrp);
if(props.shape == "match" || props.shapeType == DELIMITER_SHAPE_MATH)
if(props.shape == DELIMITER_SHAPE_MATH)
this.shape = DELIMITER_SHAPE_MATH;
else if(props.shape == "centered" || props.shapeType == DELIMITER_SHAPE_CENTERED)
else if(props.shape == DELIMITER_SHAPE_CENTERED)
this.shape = DELIMITER_SHAPE_CENTERED;
else
this.shape = DELIMITER_SHAPE_CENTERED;
......@@ -4708,14 +4708,14 @@ function CGroupCharacter()
extend(CGroupCharacter, CCharacter);
CGroupCharacter.prototype.init = function(props)
{
if(props.vertJust === "top" || props.justif == VJUST_TOP)
if(props.vertJust === VJUST_TOP)
this.vertJust = VJUST_TOP;
else if(props.vertJust === "bottom"|| props.justif == VJUST_BOT)
else if(props.vertJust === VJUST_BOT)
this.vertJust = VJUST_BOT;
if(props.pos === "top" || props.location === LOCATION_TOP)
if(props.pos === LOCATION_TOP || props.location === LOCATION_TOP)
this.loc = LOCATION_TOP;
else if(props.pos === "bot" || props.location === LOCATION_BOT)
else if(props.pos === LOCATION_BOT || props.location === LOCATION_BOT)
this.loc = LOCATION_BOT;
var type = props.chrType;
......@@ -4727,7 +4727,6 @@ CGroupCharacter.prototype.init = function(props)
this.setReduct(DEGR_REDUCT);
this.setOperator( new COperator(glyph) );
}
CGroupCharacter.prototype.getCenter = function()
{
......
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