Commit b139290b authored by Anna.Pavlova's avatar Anna.Pavlova

1. реализовала свойство argSize

(!) если у оператора выставлено свойство opEmu, то тогда для его base применяется свойство argSize = -1
2. CMathContent:
   getCurrRunPrp() => getCurrTxtPrp()
   getRPrpByPosition() => getTxtPrp()
   getFirstPrp()   => getFirstTxtPrp()
CMathRunPrp:
   getWRunPrp()    => getGeneralPrp()
3. поправила баг на afterDisplacement
4. добавила расстояние(dW) между основанием и итераторами для CDegreeSubSup

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53626 954022d7-b5bf-4e40-9824-e11837661b57
parent 2ec04793
function CMathBase() function CMathBase()
{ {
this.typeObj = MATH_COMP; this.typeObj = MATH_COMP;
this.typeElement = null; // для чтения
// {align: {height: alpha, width: betta}} alpha & betta коэффициенты в интервале от 0 до 1, либо CENTER // {align: {height: alpha, width: betta}} alpha & betta коэффициенты в интервале от 0 до 1, либо CENTER
...@@ -9,6 +8,7 @@ function CMathBase() ...@@ -9,6 +8,7 @@ function CMathBase()
this.pos = null; this.pos = null;
this.size = null; this.size = null;
this.argSize = 0;
this.CurPos_X = 0; this.CurPos_X = 0;
this.CurPos_Y = 0; this.CurPos_Y = 0;
...@@ -17,7 +17,6 @@ function CMathBase() ...@@ -17,7 +17,6 @@ function CMathBase()
startX: 0, startX: 0,
startY: 0 startY: 0
}; };
this.reduct = 1;
this.nRow = 0; this.nRow = 0;
this.nCol = 0; this.nCol = 0;
...@@ -65,7 +64,6 @@ CMathBase.prototype = ...@@ -65,7 +64,6 @@ CMathBase.prototype =
/*if( !this.elements[i][j].IsJustDraw()) /*if( !this.elements[i][j].IsJustDraw())
this.elements[i][j].setComposition(this.Composition);*/ this.elements[i][j].setComposition(this.Composition);*/
//this.elements[i][j].setTxtPrp(this.TxtPrp); //this.elements[i][j].setTxtPrp(this.TxtPrp);
//this.elements[i][j].setReduct(this.reduct);
//this.elements[i][j].setRunPrp(this.RunPrp); //this.elements[i][j].setRunPrp(this.RunPrp);
} }
} }
...@@ -86,9 +84,9 @@ CMathBase.prototype = ...@@ -86,9 +84,9 @@ CMathBase.prototype =
}, },
///////// RunPrp, CtrPrp ///////// RunPrp, CtrPrp
setCtrPrp: function(runPrp) setCtrPrp: function(txtPrp)
{ {
this.CtrPrp.Merge(runPrp); // only runPrp for paragraph this.CtrPrp.Merge(txtPrp); // only runPrp for paragraph
}, },
getCtrPrp: function() getCtrPrp: function()
{ {
...@@ -127,6 +125,47 @@ CMathBase.prototype = ...@@ -127,6 +125,47 @@ CMathBase.prototype =
this.elements[i][j].setRPrp(rPrp); this.elements[i][j].setRPrp(rPrp);
} }
}, },
increaseArgSize: function()
{
for(var i=0; i < this.nRow; i++)
for(var j = 0; j < this.nCol; j++)
this.elements[i][j].increaseArgSize();
},
decreaseArgSize: function()
{
for(var i=0; i < this.nRow; i++)
for(var j = 0; j < this.nCol; j++)
this.elements[i][j].decreaseArgSize();
},
setArgSize: function(argSize)
{
var val = this.argSize + argSize;
if(val < -2)
this.argSize = -2;
else if(val > 2)
this.argSize = 2;
else
this.argSize = val;
for(var i=0; i < this.nRow; i++)
for(var j = 0; j < this.nCol; j++)
if( !this.elements[i][j].IsJustDraw())
this.elements[i][j].setArgSize(argSize);
},
mergeCtrTPrp: function()
{
var tPrp = this.getCtrPrp();
if(this.argSize == -1)
//tPrp.FontSize *= 0.8;
tPrp.FontSize *= 0.728;
else if(this.argSize == -2)
//tPrp.FontSize *= 0.65;
tPrp.FontSize *= 0.53;
return tPrp;
},
///////// /////////
setComposition: function(Composition) setComposition: function(Composition)
...@@ -198,17 +237,7 @@ CMathBase.prototype = ...@@ -198,17 +237,7 @@ CMathBase.prototype =
{ {
this.RunPrp.Merge(txtPrp); this.RunPrp.Merge(txtPrp);
this.setTxtPrp(txtPrp); this.setTxtPrp(txtPrp);
}, },*/
old_setReduct: function(coeff)
{
this.reduct = this.reduct*coeff;
for(var i=0; i < this.nRow; i++)
for(var j = 0; j < this.nCol; j++)
{
if(! this.elements[i][j].IsJustDraw() )
this.elements[i][j].setReduct(coeff);
}
},*/
fillPlaceholders: function() fillPlaceholders: function()
{ {
for(var i=0; i < this.nRow; i++) for(var i=0; i < this.nRow; i++)
...@@ -216,14 +245,6 @@ CMathBase.prototype = ...@@ -216,14 +245,6 @@ CMathBase.prototype =
if(!this.elements[i][j].IsJustDraw()) if(!this.elements[i][j].IsJustDraw())
this.elements[i][j].fillPlaceholders(); this.elements[i][j].fillPlaceholders();
}, },
setReduct: function(coeff)
{
this.reduct = this.reduct*coeff;
},
/*getReduct: function()
{
return this.reduct;
},*/
addMCToContent: function() addMCToContent: function()
{ {
if(arguments.length == this.nRow*this.nCol) if(arguments.length == this.nRow*this.nCol)
......
...@@ -324,6 +324,9 @@ CBox.prototype.init = function(props) ...@@ -324,6 +324,9 @@ CBox.prototype.init = function(props)
this.setDimension(1, 1); this.setDimension(1, 1);
this.setContent(); this.setContent();
if(this.opEmu)
this.elements[0][0].decreaseArgSize();
} }
CBox.prototype.getBase = function() CBox.prototype.getBase = function()
{ {
......
...@@ -28,7 +28,7 @@ CDegree.prototype.init_2 = function(props, oBase) ...@@ -28,7 +28,7 @@ CDegree.prototype.init_2 = function(props, oBase)
this.setDimension(1, 2); this.setDimension(1, 2);
var oDegree = new CMathContent(); var oDegree = new CMathContent();
oDegree.setReduct(DEGR_REDUCT); oDegree.decreaseArgSize();
this.addMCToContent(oBase, oDegree); this.addMCToContent(oBase, oDegree);
} }
...@@ -51,8 +51,9 @@ CDegree.prototype.recalculateSup = function(oMeasure) ...@@ -51,8 +51,9 @@ CDegree.prototype.recalculateSup = function(oMeasure)
var descIter = iter.height - iter.ascent; var descIter = iter.height - iter.ascent;
var ctrPrp = this.getCtrPrp(); // выставить потом размер шрифта для итератора //var ctrPrp = this.getCtrPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, ctrPrp); var mgCtrPrp = this.mergeCtrTPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, mgCtrPrp);
var upper = 0; var upper = 0;
...@@ -92,8 +93,10 @@ CDegree.prototype.recalculateSubScript = function(oMeasure) ...@@ -92,8 +93,10 @@ CDegree.prototype.recalculateSubScript = function(oMeasure)
/*var FontSize = this.getCtrPrp().FontSize, /*var FontSize = this.getCtrPrp().FontSize,
shiftCenter = 0.5*DIV_CENT*FontSize;*/ shiftCenter = 0.5*DIV_CENT*FontSize;*/
var ctrPrp = this.getCtrPrp(); // выставить потом размер шрифта для итератора //var ctrPrp = this.getCtrPrp(); // выставить потом размер шрифта для итератора
var shCenter = this.Composition.GetShiftCenter(oMeasure, ctrPrp); var mgCtrPrp = this.mergeCtrTPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, mgCtrPrp);
var low = 0; var low = 0;
if(iter.ascent - shCenter > 2/3*base.height) if(iter.ascent - shCenter > 2/3*base.height)
...@@ -296,7 +299,9 @@ CDegree.prototype.getPropsForWrite = function() ...@@ -296,7 +299,9 @@ CDegree.prototype.getPropsForWrite = function()
function CIterators() function CIterators()
{ {
this.upper = 0; this.lUp = 0; // центр основания
this.lD = 0; // высота - центр основания
this.upper = 0; // смещение сверху для позиции основания
CMathBase.call(this); CMathBase.call(this);
} }
extend(CIterators, CMathBase); extend(CIterators, CMathBase);
...@@ -316,8 +321,10 @@ CIterators.prototype.setDistanceIters = function(oMeasure) ...@@ -316,8 +321,10 @@ CIterators.prototype.setDistanceIters = function(oMeasure)
/*var FontSize = this.getCtrPrp().FontSize, /*var FontSize = this.getCtrPrp().FontSize,
shCent = DIV_CENT*FontSize;*/ shCent = DIV_CENT*FontSize;*/
var ctrPrp = this.getCtrPrp(); var mgCtrPrp = this.mergeCtrTPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, ctrPrp); //var ctrPrp = this.getCtrPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, mgCtrPrp);
var upDesc = upIter.height - upIter.ascent + shCenter, var upDesc = upIter.height - upIter.ascent + shCenter,
lowAsc = lowIter.ascent - shCenter; lowAsc = lowIter.ascent - shCenter;
...@@ -339,7 +346,17 @@ CIterators.prototype.setDistanceIters = function(oMeasure) ...@@ -339,7 +346,17 @@ CIterators.prototype.setDistanceIters = function(oMeasure)
if( this.lD > lowAsc ) if( this.lD > lowAsc )
down = this.lD - lowAsc; down = this.lD - lowAsc;
this.dH = up + down; var minGap = 1.2*shCenter;
if( up + down < minGap)
{
this.dH = minGap;
}
else
{
this.dH = up + down;
}
this.dW = 0; this.dW = 0;
} }
/*CIterators.prototype.getAscent = function() /*CIterators.prototype.getAscent = function()
...@@ -369,11 +386,6 @@ CIterators.prototype.getLowerIterator = function() ...@@ -369,11 +386,6 @@ CIterators.prototype.getLowerIterator = function()
{ {
return this.elements[1][0]; return this.elements[1][0];
} }
CIterators.prototype.setReduct = function(reduct)
{
this.elements[0][0].setReduct(reduct);
this.elements[1][0].setReduct(reduct);
}
CIterators.prototype.getCtrPrp = function() CIterators.prototype.getCtrPrp = function()
{ {
return this.Parent.getCtrPrp(); return this.Parent.getCtrPrp();
...@@ -412,7 +424,8 @@ CDegreeSubSup.prototype.init_2 = function(props, oBase) ...@@ -412,7 +424,8 @@ CDegreeSubSup.prototype.init_2 = function(props, oBase)
var oIters = new CIterators(); var oIters = new CIterators();
oIters.init(); oIters.init();
oIters.setReduct(DEGR_REDUCT); oIters.decreaseArgSize();
oIters.lUp = 0; oIters.lUp = 0;
oIters.lD = 0; oIters.lD = 0;
...@@ -431,8 +444,10 @@ CDegreeSubSup.prototype.init_2 = function(props, oBase) ...@@ -431,8 +444,10 @@ CDegreeSubSup.prototype.init_2 = function(props, oBase)
} }
CDegreeSubSup.prototype.recalculateSize = function(oMeasure) CDegreeSubSup.prototype.recalculateSize = function(oMeasure)
{ {
var ctrPrp = this.getCtrPrp(); //var ctrPrp = this.getCtrPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, ctrPrp); var mgCtrPrp = this.mergeCtrTPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, mgCtrPrp) /0.6;
var width = 0, height = 0, var width = 0, height = 0,
ascent = 0; ascent = 0;
...@@ -456,12 +471,14 @@ CDegreeSubSup.prototype.recalculateSize = function(oMeasure) ...@@ -456,12 +471,14 @@ CDegreeSubSup.prototype.recalculateSize = function(oMeasure)
this.elements[0][0].recalculateSize();*/ this.elements[0][0].recalculateSize();*/
} }
iters.lUp = base.size.ascent - shCenter; iters.lUp = base.size.ascent - shCenter; // center of base
iters.lD = base.size.height - iters.lUp; iters.lD = base.size.height - iters.lUp; // height - center of base
iters.setDistanceIters(oMeasure); iters.setDistanceIters(oMeasure);
iters.recalculateSize(); iters.recalculateSize();
width = iters.size.width + base.size.width; this.dW = 0.2*shCenter;
width = iters.size.width + base.size.width + this.dW;
//height = shCenter + iters.lUp; //height = shCenter + iters.lUp;
height = iters.size.height; height = iters.size.height;
......
...@@ -82,8 +82,9 @@ CFraction.prototype.draw = function(x, y, pGraphics) ...@@ -82,8 +82,9 @@ CFraction.prototype.draw = function(x, y, pGraphics)
} }
CFraction.prototype.drawBarFraction = function(x, y, pGraphics) CFraction.prototype.drawBarFraction = function(x, y, pGraphics)
{ {
var ctrPrp = this.getCtrPrp(); //var ctrPrp = this.getCtrPrp();
var penW = ctrPrp.FontSize* this.reduct* 25.4/96 * 0.08; var mgCtrPrp = this.mergeCtrTPrp();
var penW = mgCtrPrp.FontSize* 25.4/96 * 0.08;
var numHeight = this.elements[0][0].size.height; var numHeight = this.elements[0][0].size.height;
...@@ -112,7 +113,7 @@ CFraction.prototype.drawBarFraction = function(x, y, pGraphics) ...@@ -112,7 +113,7 @@ CFraction.prototype.drawBarFraction = function(x, y, pGraphics)
if( !this.bHideBar ) if( !this.bHideBar )
{ {
pGraphics.SetFont(ctrPrp); pGraphics.SetFont(mgCtrPrp);
pGraphics.p_color(0,0,0, 255); pGraphics.p_color(0,0,0, 255);
pGraphics.b_color1(0,0,0, 255); pGraphics.b_color1(0,0,0, 255);
...@@ -123,12 +124,13 @@ CFraction.prototype.drawBarFraction = function(x, y, pGraphics) ...@@ -123,12 +124,13 @@ CFraction.prototype.drawBarFraction = function(x, y, pGraphics)
} }
CFraction.prototype.drawSkewedFraction = function(x, y, pGraphics) CFraction.prototype.drawSkewedFraction = function(x, y, pGraphics)
{ {
var ctrPrp = this.getCtrPrp(); //var ctrPrp = this.getCtrPrp();
var mgCtrPrp = this.mergeCtrTPrp();
var penW = ctrPrp.FontSize/12.5*g_dKoef_pix_to_mm; var penW = mgCtrPrp.FontSize/12.5*g_dKoef_pix_to_mm;
var gap = this.gapSlash/2 - penW/7.5; var gap = this.gapSlash/2 - penW/7.5;
var plh = 9.877777777777776 * ctrPrp.FontSize / 36; var plh = 9.877777777777776 * mgCtrPrp.FontSize / 36;
var minHeight = 2*this.gapSlash, var minHeight = 2*this.gapSlash,
middleHeight = plh*4/3, middleHeight = plh*4/3,
...@@ -199,7 +201,7 @@ CFraction.prototype.drawSkewedFraction = function(x, y, pGraphics) ...@@ -199,7 +201,7 @@ CFraction.prototype.drawSkewedFraction = function(x, y, pGraphics)
} }
pGraphics.SetFont(ctrPrp); pGraphics.SetFont(mgCtrPrp);
pGraphics.p_width(penW*1000); pGraphics.p_width(penW*1000);
...@@ -221,10 +223,11 @@ CFraction.prototype.drawLinearFraction = function(x, y, pGraphics) ...@@ -221,10 +223,11 @@ CFraction.prototype.drawLinearFraction = function(x, y, pGraphics)
x2 = this.pos.x + x + this.elements[0][0].size.width + shift, x2 = this.pos.x + x + this.elements[0][0].size.width + shift,
y2 = this.pos.y + y + this.size.height; y2 = this.pos.y + y + this.size.height;
var ctrPrp = this.getCtrPrp(); //var ctrPrp = this.getCtrPrp();
var penW = ctrPrp.FontSize/12.5*g_dKoef_pix_to_mm; var mgCtrPrp = this.mergeCtrTPrp();
var penW = mgCtrPrp.FontSize/12.5*g_dKoef_pix_to_mm;
pGraphics.SetFont(ctrPrp); pGraphics.SetFont(mgCtrPrp);
pGraphics.p_width(penW*1000); pGraphics.p_width(penW*1000);
pGraphics.p_color(0,0,0, 255); pGraphics.p_color(0,0,0, 255);
...@@ -273,22 +276,25 @@ CFraction.prototype.recalculateBarFraction = function(oMeasure) ...@@ -273,22 +276,25 @@ CFraction.prototype.recalculateBarFraction = function(oMeasure)
var num = this.elements[0][0].size, var num = this.elements[0][0].size,
den = this.elements[1][0].size; den = this.elements[1][0].size;
var ctrPrp = this.getCtrPrp(); //var ctrPrp = this.getCtrPrp();
var mgCtrPrp = this.mergeCtrTPrp();
var width = num.width > den.width ? num.width : den.width; var width = num.width > den.width ? num.width : den.width;
var height = num.height + den.height; var height = num.height + den.height;
var ascent = num.height + this.Composition.GetShiftCenter(oMeasure, ctrPrp); var ascent = num.height + this.Composition.GetShiftCenter(oMeasure, mgCtrPrp);
//var ascent = num.height; //var ascent = num.height;
this.size = {width: width, height: height, ascent: ascent}; this.size = {width: width, height: height, ascent: ascent};
} }
CFraction.prototype.recalculateSkewed = function(oMeasure) CFraction.prototype.recalculateSkewed = function(oMeasure)
{ {
var ctrPrp = this.getCtrPrp(); //var ctrPrp = this.getCtrPrp();
this.gapSlash = 5.011235894097222 * ctrPrp.FontSize/36; var mgCtrPrp = this.mergeCtrTPrp();
this.gapSlash = 5.011235894097222 * mgCtrPrp.FontSize/36;
var _width = this.elements[0][0].size.width + this.gapSlash + this.elements[0][1].size.width; var _width = this.elements[0][0].size.width + this.gapSlash + this.elements[0][1].size.width;
var _height = this.elements[0][0].size.height + this.elements[0][1].size.height; var _height = this.elements[0][0].size.height + this.elements[0][1].size.height;
var _ascent = this.elements[0][0].size.height + this.Composition.GetShiftCenter(oMeasure, ctrPrp); var _ascent = this.elements[0][0].size.height + this.Composition.GetShiftCenter(oMeasure, mgCtrPrp);
this.size = {width: _width, height: _height, ascent: _ascent}; this.size = {width: _width, height: _height, ascent: _ascent};
} }
...@@ -300,9 +306,10 @@ CFraction.prototype.recalculateLinear = function() ...@@ -300,9 +306,10 @@ CFraction.prototype.recalculateLinear = function()
DescentSecond = this.elements[0][1].size.height - this.elements[0][1].size.ascent; DescentSecond = this.elements[0][1].size.height - this.elements[0][1].size.ascent;
var H = AscentFirst + DescentSecond; var H = AscentFirst + DescentSecond;
var ctrPrp = this.getCtrPrp(); //var ctrPrp = this.getCtrPrp();
var mgCtrPrp = this.mergeCtrTPrp();
var gap = 5.011235894097222*ctrPrp.FontSize/36; var gap = 5.011235894097222*mgCtrPrp.FontSize/36;
var H3 = gap*4.942252165543792, var H3 = gap*4.942252165543792,
H4 = gap*7.913378248315688, H4 = gap*7.913378248315688,
...@@ -441,14 +448,13 @@ CNumerator.prototype.init = function() ...@@ -441,14 +448,13 @@ CNumerator.prototype.init = function()
CNumerator.prototype.recalculateSize = function() CNumerator.prototype.recalculateSize = function()
{ {
var arg = this.elements[0][0].size; var arg = this.elements[0][0].size;
//var txtPrp = this.getTxtPrp();
//txtPrp.FontSize *= this.Parent.reduct;
var ctrPrp = this.getCtrPrp(); //var ctrPrp = this.getCtrPrp();
var mgCtrPrp = this.mergeCtrTPrp();
var Descent = arg.height - arg.ascent; // baseLine var Descent = arg.height - arg.ascent; // baseLine
var gapNum = 7.832769097222222 * ctrPrp.FontSize/36, var gapNum = 7.832769097222222 * mgCtrPrp.FontSize/36,
minGap = ctrPrp.FontSize* 25.4/96 * 0.16; minGap = mgCtrPrp.FontSize* 25.4/96 * 0.16;
// var delta = 0.65*gap - Descent; // var delta = 0.65*gap - Descent;
var delta = 0.8076354679802956*gapNum - Descent; var delta = 0.8076354679802956*gapNum - Descent;
...@@ -484,10 +490,6 @@ CNumerator.prototype.getElement = function() ...@@ -484,10 +490,6 @@ CNumerator.prototype.getElement = function()
{ {
return this.elements[0][0]; return this.elements[0][0];
} }
CNumerator.prototype.getReduct = function()
{
return this.Parent.getReduct();
}
CNumerator.prototype.getCtrPrp = function() CNumerator.prototype.getCtrPrp = function()
{ {
return this.Parent.getCtrPrp(); return this.Parent.getCtrPrp();
...@@ -507,10 +509,11 @@ CDenominator.prototype.init = function() ...@@ -507,10 +509,11 @@ CDenominator.prototype.init = function()
CDenominator.prototype.recalculateSize = function() CDenominator.prototype.recalculateSize = function()
{ {
var arg = this.elements[0][0].size; var arg = this.elements[0][0].size;
var ctrPrp = this.getCtrPrp(); //var ctrPrp = this.getCtrPrp();
var mgCtrPrp = this.mergeCtrTPrp();
var gapDen = 7.325682539682539 * ctrPrp.FontSize/36, var gapDen = 7.325682539682539 * mgCtrPrp.FontSize/36,
Ascent = arg.ascent - 4.938888888888888*ctrPrp.FontSize/36, Ascent = arg.ascent - 4.938888888888888*mgCtrPrp.FontSize/36,
minGap = gapDen/3; minGap = gapDen/3;
var delta = gapDen - Ascent; var delta = gapDen - Ascent;
...@@ -553,10 +556,6 @@ CDenominator.prototype.getElement = function(txt) ...@@ -553,10 +556,6 @@ CDenominator.prototype.getElement = function(txt)
{ {
return this.elements[0][0]; return this.elements[0][0];
} }
CDenominator.prototype.getReduct = function()
{
return this.Parent.getReduct();
}
CDenominator.prototype.getCtrPrp = function() CDenominator.prototype.getCtrPrp = function()
{ {
return this.Parent.getCtrPrp(); return this.Parent.getCtrPrp();
......
...@@ -16,7 +16,7 @@ CLimit.prototype.init = function(props) ...@@ -16,7 +16,7 @@ CLimit.prototype.init = function(props)
var oBase = new CMathContent(); var oBase = new CMathContent();
var oIter = new CMathContent(); var oIter = new CMathContent();
oIter.setReduct(DEGR_REDUCT); oIter.decreaseArgSize();
if(this.type == LIMIT_LOW) if(this.type == LIMIT_LOW)
this.addMCToContent(oBase, oIter); this.addMCToContent(oBase, oIter);
...@@ -70,7 +70,6 @@ CLimit.prototype.getPropsForWrite = function() ...@@ -70,7 +70,6 @@ CLimit.prototype.getPropsForWrite = function()
function CMathFunc() function CMathFunc()
{ {
this.kind = MATH_FUNCTION; this.kind = MATH_FUNCTION;
CMathBase.call(this); CMathBase.call(this);
} }
extend(CMathFunc, CMathBase); extend(CMathFunc, CMathBase);
......
This diff is collapsed.
...@@ -170,7 +170,7 @@ CMathMatrix.prototype.setRuleGap = function(space, rule, gap, minGap) ...@@ -170,7 +170,7 @@ CMathMatrix.prototype.setRuleGap = function(space, rule, gap, minGap)
} }
CMathMatrix.prototype.recalculateSize = function() CMathMatrix.prototype.recalculateSize = function()
{ {
var txtPrp = this.getCtrPrp(); var txtPrp = this.mergeCtrTPrp();
var interval = this.getLineGap(txtPrp); var interval = this.getLineGap(txtPrp);
this.gaps.column[0] = 0; this.gaps.column[0] = 0;
...@@ -377,7 +377,6 @@ CMathMatrix.prototype.addRow = function() ...@@ -377,7 +377,6 @@ CMathMatrix.prototype.addRow = function()
this.elements[this.nRow-1][j] = new CMathContent(); this.elements[this.nRow-1][j] = new CMathContent();
this.elements[this.nRow-1][j].relate(this); this.elements[this.nRow-1][j].relate(this);
this.elements[this.nRow-1][j].setComposition(this.Composition); 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); //this.elements[this.nRow-1][j].setComposition(this.Composition);
} }
......
...@@ -241,7 +241,7 @@ CNaryUnd.prototype.init = function(sign) ...@@ -241,7 +241,7 @@ CNaryUnd.prototype.init = function(sign)
{ {
this.setDimension(2,1); this.setDimension(2,1);
var iter = new CMathContent(); var iter = new CMathContent();
//iter.setReduct(DEGR_REDUCT); iter.decreaseArgSize();
this.addMCToContent(iter, sign); this.addMCToContent(iter, sign);
} }
...@@ -268,9 +268,8 @@ extend(CNaryOvr, CMathBase); ...@@ -268,9 +268,8 @@ extend(CNaryOvr, CMathBase);
CNaryOvr.prototype.init = function(sign) CNaryOvr.prototype.init = function(sign)
{ {
this.setDimension(2,1); this.setDimension(2,1);
var iter = new CMathContent(); var iter = new CMathContent();
//iter.setReduct(DEGR_REDUCT); iter.decreaseArgSize();
this.addMCToContent(sign, iter); this.addMCToContent(sign, iter);
} }
...@@ -300,10 +299,10 @@ CNaryUndOvr.prototype.init = function(sign) ...@@ -300,10 +299,10 @@ CNaryUndOvr.prototype.init = function(sign)
this.setDimension(3,1); this.setDimension(3,1);
var iter1 = new CMathContent(); var iter1 = new CMathContent();
//iter1.setReduct(DEGR_REDUCT); iter1.decreaseArgSize();
var iter2 = new CMathContent(); var iter2 = new CMathContent();
//iter2.setReduct(DEGR_REDUCT); iter2.decreaseArgSize();
this.addMCToContent(iter1, sign, iter2); this.addMCToContent(iter1, sign, iter2);
} }
......
...@@ -207,9 +207,8 @@ CRadical.prototype.init = function(props) ...@@ -207,9 +207,8 @@ CRadical.prototype.init = function(props)
{ {
this.setDimension(1, 2); this.setDimension(1, 2);
var oBase = new CMathContent(); var oBase = new CMathContent();
var oDegree = new CMathContent(); var oDegree = new CMathContent();
oDegree.setReduct(DEGR_REDUCT); oDegree.decreaseArgSize();
this.addMCToContent(oDegree, oBase); this.addMCToContent(oDegree, oBase);
} }
......
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