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

1. N-арные опрераторы (переделала свойства)

2. добавила элемент Box

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49182 954022d7-b5bf-4e40-9824-e11837661b57
parent f46ffdc3
......@@ -219,3 +219,22 @@ CBorderBox.prototype.getElement = function()
{
return this.elements[0][0];
}
function CBox()
{
this.type = null;
CMathBase.call(this);
}
extend(CBox, CMathBase);
CBox.prototype.init = function(props)
{
this.type = props.type;
this.bSpacing = ( props.spacing === 1 || props.spacing === true ) ? true : false;
this.setDimension(1, 1);
this.setContent();
}
CBox.prototype.getElement = function()
{
return this.elements[0][0];
}
\ No newline at end of file
......@@ -7,14 +7,7 @@ function CDegree()
extend(CDegree, CMathBase);
CDegree.prototype.init = function(props)
{
this.type = props.type;
this.setDimension(1, 2);
var oBase = new CMathContent();
var oDegree = new CMathContent();
oDegree.setReduct(DEGR_REDUCT);
this.addMCToContent(oBase, oDegree);
this.init_2( props, new CMathContent() );
}
CDegree.prototype.init_2 = function(props, oBase)
{
......@@ -42,12 +35,12 @@ CDegree.prototype.recalculateSize = function()
_width += this.dW;
if(this.type === 1 )
if(this.type === SUPERSCRIPT )
{
this.shiftDegree = 0;
_center = _height - (this.elements[0][0].size.height - this.elements[0][0].size.center);
}
else if(this.type === -1 )
else if(this.type === SUBSCRIPT )
{
this.shiftDegree = _height - this.elements[0][1].size.height;
_center = this.elements[0][0].size.center;
......
//поправить центр у N-арных операторов
/*
FRACTION
MATH_FUNCTION
NARY
BOX (доделать Spacing)
DEGREE
DEGREE_SubSup
RADICAL
LIMIT (доделать для случая limLow)
*/
var historyitem_Math_AddItem = 1; // Добавляем элемент
var historyitem_Math_RemoveItem = 2; // Удаляем элемент
var TEST = true;
var TEST_2 = true;
var TEST_2 = false;
var StartTextElement = 0x2B1A; // Cambria Math
......@@ -2466,295 +2477,611 @@ CMathContent.prototype =
break;
case 23:
var integr = this.addMComponent(8);
integr.init(0,0,0);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_INTEGRAL,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
integr.init(props);
integr.fillPlaceholders();
break;
case 24:
var integr = this.addMComponent(8);
integr.init(0,1,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_INTEGRAL,
limLocType: NARY_SubSup
};
integr.init(props);
integr.fillPlaceholders();
break;
case 25:
var integr = this.addMComponent(8);
integr.init(0,0,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_INTEGRAL,
limLocType: NARY_UndOvr
};
integr.init(props);
integr.fillPlaceholders();
break;
case 26:
var integr = this.addMComponent(8);
integr.init(1,0,0);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_DOUBLE_INTEGRAL,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
integr.init(props);
integr.fillPlaceholders();
break;
case 27:
var integr = this.addMComponent(8);
integr.init(1,1,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_DOUBLE_INTEGRAL,
limLocType: NARY_SubSup
};
integr.init(props);
integr.fillPlaceholders();
break;
case 28:
var integr = this.addMComponent(8);
integr.init(1,0,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_DOUBLE_INTEGRAL,
limLocType: NARY_UndOvr
};
integr.init(props);
integr.fillPlaceholders();
break;
case 29:
var integr = this.addMComponent(8);
integr.init(2,0,0);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_TRIPLE_INTEGRAL,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
integr.init(props);
integr.fillPlaceholders();
break;
case 30:
var integr = this.addMComponent(8);
integr.init(2,1,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_TRIPLE_INTEGRAL,
limLocType: NARY_SubSup
};
integr.init(props);
integr.fillPlaceholders();
break;
case 31:
var integr = this.addMComponent(8);
integr.init(2,0,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_TRIPLE_INTEGRAL,
limLocType: NARY_UndOvr
};
integr.init(props);
integr.fillPlaceholders();
break;
case 32:
var integr = this.addMComponent(8);
integr.init(3,0,0);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_CONTOUR_INTEGRAL,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
integr.init(props);
integr.fillPlaceholders();
break;
case 33:
var integr = this.addMComponent(8);
integr.init(3,1,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_CONTOUR_INTEGRAL,
limLocType: NARY_SubSup
};
integr.init(props);
integr.fillPlaceholders();
break;
case 34:
var integr = this.addMComponent(8);
integr.init(3,0,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_CONTOUR_INTEGRAL,
limLocType: NARY_UndOvr
};
integr.init(props);
integr.fillPlaceholders();
break;
case 35:
var integr = this.addMComponent(8);
integr.init(4,0,0);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_SURFACE_INTEGRAL,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
integr.init(props);
integr.fillPlaceholders();
break;
case 36:
var integr = this.addMComponent(8);
integr.init(4,1,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_SURFACE_INTEGRAL,
limLocType: NARY_SubSup
};
integr.init(props);
integr.fillPlaceholders();
break;
case 37:
var integr = this.addMComponent(8);
integr.init(4,0,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_SURFACE_INTEGRAL,
limLocType: NARY_UndOvr
};
integr.init(props);
integr.fillPlaceholders();
break;
case 38:
var integr = this.addMComponent(8);
integr.init(5,0,0);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_VOLUME_INTEGRAL,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
integr.init(props);
integr.fillPlaceholders();
break;
case 39:
var integr = this.addMComponent(8);
integr.init(5,1,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_VOLUME_INTEGRAL,
limLocType: NARY_SubSup
};
integr.init(props);
integr.fillPlaceholders();
break;
case 40:
var integr = this.addMComponent(8);
integr.init(5,0,3);
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_VOLUME_INTEGRAL,
limLocType: NARY_UndOvr
};
integr.init(props);
integr.fillPlaceholders();
break;
case 41:
var base = this.addMComponent(22);
base.setDimension(1,1);
base.setContent();
var elem = base.getElement(0,0);
elem.addTxt("dx");
var box = this.addMComponent(MATH_BOX);
var props =
{
type: BOX_DIFF,
spacing: 1
};
box.init(props);
var base = box.getElement();
base.addTxt("dx");
break;
case 42:
var base = this.addMComponent(22);
base.setDimension(1,1);
base.setContent();
var elem = base.getElement(0,0);
elem.addTxt("dy");
var box = this.addMComponent(MATH_BOX);
var props =
{
type: BOX_DIFF,
spacing: 1
};
box.init(props);
var base = box.getElement();
base.addTxt("dy");
break;
case 43:
var base = this.addMComponent(22);
base.setDimension(1,1);
base.setContent();
var elem = base.getElement(0,0);
elem.addTxt("");
var box = this.addMComponent(MATH_BOX);
var props =
{
type: BOX_DIFF,
spacing: 1
};
box.init(props);
var base = box.getElement();
base.addTxt("");
break;
case 44:
var sigma = this.addMComponent(8);
sigma.init(6,0,0);
sigma.fillPlaceholders();
var integr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_SIGMA,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
integr.init(props);
integr.fillPlaceholders();
break;
case 45:
var sigma = this.addMComponent(8);
sigma.init(6,0,3);
var sigma = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_SIGMA,
limLocType: NARY_UndOvr
};
sigma.init(props);
sigma.fillPlaceholders();
break;
case 46:
var sigma = this.addMComponent(8);
sigma.init(6,1,3);
var sigma = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_SIGMA,
limLocType: NARY_SubSup
};
sigma.init(props);
sigma.fillPlaceholders();
break;
case 47:
var sigma = this.addMComponent(8);
sigma.init(6,0,2);
var sigma = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_SIGMA,
limLocType: NARY_UndOvr,
subHide: 1
};
sigma.init(props);
sigma.fillPlaceholders();
break;
case 48:
var sigma = this.addMComponent(8);
sigma.init(6,1,2);
var sigma = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_SIGMA,
limLocType: NARY_SubSup,
subHide: 1
};
sigma.init(props);
sigma.fillPlaceholders();
break;
case 49:
var product = this.addMComponent(8);
product.init(7,0,0);
var product = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_PRODUCT,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
product.init(props);
product.fillPlaceholders();
break;
case 50:
var product = this.addMComponent(8);
product.init(7,0,3);
var product = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_PRODUCT,
limLocType: NARY_UndOvr
};
product.init(props);
product.fillPlaceholders();
break;
case 51:
var product = this.addMComponent(8);
product.init(7,1,3);
var product = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_PRODUCT,
limLocType: NARY_SubSup
};
product.init(props);
product.fillPlaceholders();
break;
case 52:
var product = this.addMComponent(8);
product.init(7,0,2);
var product = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_PRODUCT,
limLocType: NARY_UndOvr,
subHide: 1
};
product.init(props);
product.fillPlaceholders();
break;
case 53:
var product = this.addMComponent(8);
product.init(7,1,2);
var product = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_PRODUCT,
limLocType: NARY_SubSup,
subHide: 1
};
product.init(props);
product.fillPlaceholders();
break;
case 54:
var product = this.addMComponent(8);
product.init(8,0,0);
product.fillPlaceholders();
var coproduct = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_COPRODUCT,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
coproduct.init(props);
coproduct.fillPlaceholders();
break;
case 55:
var product = this.addMComponent(8);
product.init(8,0,3);
product.fillPlaceholders();
var coproduct = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_COPRODUCT,
limLocType: NARY_UndOvr
};
coproduct.init(props);
coproduct.fillPlaceholders();
break;
case 56:
var product = this.addMComponent(8);
product.init(8,1,3);
product.fillPlaceholders();
var coproduct = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_COPRODUCT,
limLocType: NARY_SubSup
};
coproduct.init(props);
coproduct.fillPlaceholders();
break;
case 57:
var product = this.addMComponent(8);
product.init(8,0,2);
product.fillPlaceholders();
var coproduct = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_COPRODUCT,
limLocType: NARY_UndOvr,
subHide: 1
};
coproduct.init(props);
coproduct.fillPlaceholders();
break;
case 58:
var product = this.addMComponent(8);
product.init(8,1,2);
product.fillPlaceholders();
var coproduct = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_COPRODUCT,
limLocType: NARY_SubSup,
subHide: 1
};
coproduct.init(props);
coproduct.fillPlaceholders();
break;
case 59:
var union = this.addMComponent(8);
union.init(9,0,0);
var union = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_UNION,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
union.init(props);
union.fillPlaceholders();
break;
case 60:
var union = this.addMComponent(8);
union.init(9,0,3);
var union = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_UNION,
limLocType: NARY_UndOvr
};
union.init(props);
union.fillPlaceholders();
break;
case 61:
var union = this.addMComponent(8);
union.init(9,1,3);
var union = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_UNION,
limLocType: NARY_SubSup
};
union.init(props);
union.fillPlaceholders();
break;
case 62:
var union = this.addMComponent(8);
union.init(9,0,2);
var union = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_UNION,
limLocType: NARY_UndOvr,
subHide: 1
};
union.init(props);
union.fillPlaceholders();
break;
case 63:
var union = this.addMComponent(8);
union.init(9,1,2);
var union = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_UNION,
limLocType: NARY_SubSup,
subHide: 1
};
union.init(props);
union.fillPlaceholders();
break;
case 64:
var union = this.addMComponent(8);
union.init(10,0,0);
union.fillPlaceholders();
var intersection = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_INTERSECTION,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
intersection.init(props);
intersection.fillPlaceholders();
break;
case 65:
var union = this.addMComponent(8);
union.init(10,0,3);
union.fillPlaceholders();
var intersection = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_INTERSECTION,
limLocType: NARY_UndOvr
};
intersection.init(props);
intersection.fillPlaceholders();
break;
case 66:
var union = this.addMComponent(8);
union.init(10,1,3);
union.fillPlaceholders();
var intersection = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_INTERSECTION,
limLocType: NARY_SubSup
};
intersection.init(props);
intersection.fillPlaceholders();
break;
case 67:
var union = this.addMComponent(8);
union.init(10,0,2);
union.fillPlaceholders();
var intersection = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_INTERSECTION,
limLocType: NARY_UndOvr,
subHide: 1
};
intersection.init(props);
intersection.fillPlaceholders();
break;
case 68:
var union = this.addMComponent(8);
union.init(10,1,2);
union.fillPlaceholders();
var intersection = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_INTERSECTION,
limLocType: NARY_SubSup,
subHide: 1
};
intersection.init(props);
intersection.fillPlaceholders();
break;
case 69:
var logicalOr = this.addMComponent(8);
logicalOr.init(11,0,0);
var logicalOr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_OR,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
logicalOr.init(props);
logicalOr.fillPlaceholders();
break;
case 70:
var logicalOr = this.addMComponent(8);
logicalOr.init(11,0,3);
var logicalOr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_OR,
limLocType: NARY_UndOvr
};
logicalOr.init(props);
logicalOr.fillPlaceholders();
break;
case 71:
var logicalOr = this.addMComponent(8);
logicalOr.init(11,1,3);
var logicalOr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_OR,
limLocType: NARY_SubSup
};
logicalOr.init(props);
logicalOr.fillPlaceholders();
break;
case 72:
var logicalOr = this.addMComponent(8);
logicalOr.init(11,0,2);
var logicalOr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_OR,
limLocType: NARY_UndOvr,
subHide: 1
};
logicalOr.init(props);
logicalOr.fillPlaceholders();
break;
case 73:
var logicalOr = this.addMComponent(8);
logicalOr.init(11,1,2);
var logicalOr = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_OR,
limLocType: NARY_SubSup,
subHide: 1
};
logicalOr.init(props);
logicalOr.fillPlaceholders();
break;
case 74:
var logicalOr = this.addMComponent(8);
logicalOr.init(12,0,0);
logicalOr.fillPlaceholders();
var logicalAnd = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_AND,
limLocType: NARY_UndOvr,
subHide: 1,
supHide: 1
};
logicalAnd.init(props);
logicalAnd.fillPlaceholders();
break;
case 75:
var logicalOr = this.addMComponent(8);
logicalOr.init(12,0,3);
logicalOr.fillPlaceholders();
var logicalAnd = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_AND,
limLocType: NARY_UndOvr
};
logicalAnd.init(props);
logicalAnd.fillPlaceholders();
break;
case 76:
var logicalOr = this.addMComponent(8);
logicalOr.init(12,1,3);
logicalOr.fillPlaceholders();
var logicalAnd = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_AND,
limLocType: NARY_SubSup
};
logicalAnd.init(props);
logicalAnd.fillPlaceholders();
break;
case 77:
var logicalOr = this.addMComponent(8);
logicalOr.init(12,0,2);
logicalOr.fillPlaceholders();
var logicalAnd = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_AND,
limLocType: NARY_UndOvr,
subHide: 1
};
logicalAnd.init(props);
logicalAnd.fillPlaceholders();
break;
case 78:
var logicalOr = this.addMComponent(8);
logicalOr.init(12,1,2);
logicalOr.fillPlaceholders();
var logicalAnd = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_LOGICAL_AND,
limLocType: NARY_SubSup,
subHide: 1
};
logicalAnd.init(props);
logicalAnd.fillPlaceholders();
break;
case 79:
......@@ -2774,8 +3101,14 @@ CMathContent.prototype =
break;
case 80:
var sigma = this.addMComponent(8);
sigma.init(6,0,3);
var sigma = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_SIGMA,
limLocType: NARY_UndOvr
};
sigma.init(props);
var iterUp = sigma.getUpperIterator();
iterUp.addTxt("n");
var iterLow = sigma.getLowerIterator();
......@@ -2784,16 +3117,20 @@ CMathContent.prototype =
base.fillPlaceholders();
break;
case 81:
var product = this.addMComponent(8);
product.init(7,0,3);
var product = this.addMComponent(MATH_NARY);
props =
{
signType: NARY_PRODUCT,
limLocType: NARY_UndOvr
};
product.init(props);
var iterUp = product.getUpperIterator();
iterUp.addTxt("n");
var iterLow = product.getLowerIterator();
iterLow.addTxt("k=1");
var base = product.getBase();
var degr = base.addMComponent(3);
degr.init();
degr.setIndex(-1);
var degr = base.addMComponent(MATH_DEGREE);
degr.init({type: SUBSCRIPT});
var baseDgr = degr.getBase();
baseDgr.addTxt("A");
var iter = degr.getIterator();
......@@ -5949,3 +6286,5 @@ function CEmpty()
this.setOwnTPrp = function() {};
}
......@@ -26,5 +26,29 @@ var PreSubSup = -1;
var SQUARE_RADICAL = 0;
var DEGREE_RADICAL = 1;
var NARY_INTEGRAL = 0;
var NARY_DOUBLE_INTEGRAL = 1;
var NARY_TRIPLE_INTEGRAL = 2;
var NARY_CONTOUR_INTEGRAL = 3;
var NARY_SURFACE_INTEGRAL = 4;
var NARY_VOLUME_INTEGRAL = 5;
var NARY_SIGMA = 6;
var NARY_PRODUCT = 7;
var NARY_COPRODUCT = 8;
var NARY_UNION = 9;
var NARY_INTERSECTION = 10;
var NARY_LOGICAL_OR = 11;
var NARY_LOGICAL_AND = 12;
var NARY_UndOvr = 0;
var NARY_SubSup = 1;
var BOX_DIFF = 0;
var BOX_OpEmu = 1;
var BOX_ALIGN = 2;
var BOX_BREAK = 3;
var BOX_NOBREAK = 4;
var LIMIT_LOW = 0;
var LIMIT_UP = 1;
\ No newline at end of file
......@@ -13,15 +13,118 @@
function CNary()
{
CSubMathBase.call(this);
}
extend(CNary, CSubMathBase);
CNary.prototype.init = function(props)
{
this.typeSign = props.sign;
this.limLoc = props.limLoc;
this.supHide = props.supHide;
this.subHide = props.subHide;
if(props.limLoc == "undOvr" || props.limLocType == NARY_UndOvr)
this.limLoc = 0;
else if(props.limLoc === "subSup"|| props.limLocType == NARY_SubSup)
this.limLoc = 1;
else
this.limLoc = 1;
this.supHide = (props.supHide === 1 || props.supHide === true) ? true : false;
this.subHide = (props.subHide === 1 || props.subHide === true) ? true : false;
this.setDimension(1, 2);
var sign = null;
if(props.sign == 0x222B || props.signType == NARY_INTEGRAL)
sign = new CIntegral();
else if(props.sign == 0x222C || props.signType == NARY_DOUBLE_INTEGRAL)
sign = new CDoubleIntegral();
else if(props.sign == 0x222D || props.signType == NARY_TRIPLE_INTEGRAL)
sign = new CTripleIntegral();
else if(props.sign == 0x222E || props.signType == NARY_CONTOUR_INTEGRAL )
sign = new CContourIntegral();
else if(props.sign == 0x222F || props.signType == NARY_SURFACE_INTEGRAL )
sign = new CSurfaceIntegral();
else if(props.sign == 0x2230 || props.signType == NARY_VOLUME_INTEGRAL)
sign = new CVolumeIntegral();
else if(props.sign ==0x2211 || props.signType == NARY_SIGMA)
sign = new CSigma();
else if(props.sign == 0x220F || props.signType == NARY_PRODUCT)
sign = new CProduct();
else if(props.sign ==0x2210 || props.signType == NARY_COPRODUCT)
sign = new CProduct(-1);
else if(props.sign == 0x22C3 || props.signType == NARY_UNION)
sign = new CUnion();
else if(props.sign == 0x22C2 || props.signType == NARY_INTERSECTION)
sign = new CUnion(-1);
else if(props.sign == 0x22C1 || props.signType == NARY_LOGICAL_OR)
sign = new CLogicalOr();
else if(props.sign == 0x22C0 || props.signType == NARY_LOGICAL_AND)
sign = new CLogicalOr(-1);
else
sign = new CIntegral();
var arg = new CMathContent(),
base;
if(this.limLoc === 0)
{
if(this.supHide && this.subHide)
{
base = sign;
}
else if( this.supHide && !this.subHide )
{
base = new CNaryUnd();
base.init(sign);
}
else if( !this.supHide && this.subHide )
{
base = new CNaryOvr();
base.init(sign);
}
else
{
base = new CNaryUndOvr();
base.init(sign);
}
}
else
{
if( this.supHide && !this.subHide )
{
base = new CDegree();
props = {type: SUPERSCRIPT};
base.init_2(props, sign);
}
else if( !this.supHide && this.subHide )
{
base = new CDegree();
props = {type: SUBSCRIPT};
base.init_2(props, sign);
}
else
{
base = new CDegreeSubSup();
props = {type: SubSup};
base.init_2(props, sign);
}
}
this.addMCToContent(base, arg);
}
CNary.prototype.setDistance = function()
{
this.dW = this.getTxtPrp().FontSize/36*2.45;
}
CNary.prototype.getBase = function()
{
return this.elements[0][1];
}
CNary.prototype.getUpperIterator = function()
{
return this.elements[0][0].getUpperIterator();
}
CNary.prototype.getLowerIterator = function()
{
return this.elements[0][0].getLowerIterator();
}
......
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