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

1. Реализовала выравнивание в EqqArray для Last элемента

2. new Array() -> []
3. extend -> Asc.extendClass (Common/editorscommon.js)
4. Поправила баг: не открывались файлы с Limit функциями в Inline формулах
5. Поправила баг для Limit функций в случае, если они находятся в Inline формулах. Если Limit обернут в MathFunc, то он должен отображаться в виде степени (то есть еще будет и аргумент для Limit в MathFunc), если же нет, то отображается стандартно

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58035 954022d7-b5bf-4e40-9824-e11837661b57
parent 0c1d00c5
...@@ -7726,27 +7726,30 @@ ParaRun.prototype.old_Math_SetPosition = function(pos, PosInfo, CurrWPoints) ...@@ -7726,27 +7726,30 @@ ParaRun.prototype.old_Math_SetPosition = function(pos, PosInfo, CurrWPoints)
} }
ParaRun.prototype.Math_SetPosition = function(PosInfo) ParaRun.prototype.Math_SetPosition = function(PosInfo)
{ {
var NewPos;
if(this.bEqqArray) if(this.bEqqArray)
{ {
for(var Pos = 0; Pos < this.Content.length; Pos++) for(var Pos = 0; Pos < this.Content.length; Pos++)
{ {
var CurrElem = this.Content[Pos]; var CurrElem = this.Content[Pos];
var NewPos = new CMathPosition(); NewPos = new CMathPosition();
NewPos.x = PosInfo.x;
NewPos.y = PosInfo.y - this.size.ascent;
if(this.Content[Pos].Type == para_Math_Ampersand) if(this.Content[Pos].Type == para_Math_Ampersand)
{ {
PosInfo.UpdatePoint(); PosInfo.UpdatePoint();
PosInfo.ApplyAlign(); PosInfo.ApplyAlign();
NewPos.x = PosInfo.x;
NewPos.y = PosInfo.y - this.size.ascent;
CurrElem.setPosition(NewPos); CurrElem.setPosition(NewPos);
} }
else else
{ {
NewPos.x = PosInfo.x;
NewPos.y = PosInfo.y - this.size.ascent;
CurrElem.setPosition(NewPos); CurrElem.setPosition(NewPos);
} }
...@@ -7899,7 +7902,7 @@ ParaRun.prototype.Math_SetPosition = function(PosInfo) ...@@ -7899,7 +7902,7 @@ ParaRun.prototype.Math_SetPosition = function(PosInfo)
{ {
for(var i = 0; i < this.Content.length; i++) for(var i = 0; i < this.Content.length; i++)
{ {
var NewPos = new CMathPosition(); NewPos = new CMathPosition();
NewPos.x = PosInfo.x; NewPos.x = PosInfo.x;
NewPos.y = PosInfo.y - this.size.ascent; NewPos.y = PosInfo.y - this.size.ascent;
......
...@@ -19,7 +19,7 @@ function CAccentCircumflex() ...@@ -19,7 +19,7 @@ function CAccentCircumflex()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CAccentCircumflex, CGlyphOperator); Asc.extendClass(CAccentCircumflex, CGlyphOperator);
CAccentCircumflex.prototype.calcSize = function(stretch) CAccentCircumflex.prototype.calcSize = function(stretch)
{ {
var alpha = this.Parent.Get_CompiledCtrPrp().FontSize/36; var alpha = this.Parent.Get_CompiledCtrPrp().FontSize/36;
...@@ -122,7 +122,7 @@ function CAccentLine() ...@@ -122,7 +122,7 @@ function CAccentLine()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CAccentLine, CGlyphOperator); Asc.extendClass(CAccentLine, CGlyphOperator);
CAccentLine.prototype.calcSize = function(stretch) CAccentLine.prototype.calcSize = function(stretch)
{ {
var alpha = this.Parent.Get_CompiledCtrPrp().FontSize/36; var alpha = this.Parent.Get_CompiledCtrPrp().FontSize/36;
...@@ -166,7 +166,7 @@ function CAccentDoubleLine() ...@@ -166,7 +166,7 @@ function CAccentDoubleLine()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CAccentDoubleLine, CGlyphOperator); Asc.extendClass(CAccentDoubleLine, CGlyphOperator);
CAccentDoubleLine.prototype.calcSize = function(stretch) CAccentDoubleLine.prototype.calcSize = function(stretch)
{ {
var alpha = this.Parent.Get_CompiledCtrPrp().FontSize/36; var alpha = this.Parent.Get_CompiledCtrPrp().FontSize/36;
...@@ -225,7 +225,7 @@ function CAccentTilde() ...@@ -225,7 +225,7 @@ function CAccentTilde()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CAccentTilde, CGlyphOperator); Asc.extendClass(CAccentTilde, CGlyphOperator);
CAccentTilde.prototype.calcSize = function(stretch) CAccentTilde.prototype.calcSize = function(stretch)
{ {
var betta = this.Parent.Get_CompiledCtrPrp().FontSize/36; var betta = this.Parent.Get_CompiledCtrPrp().FontSize/36;
...@@ -312,7 +312,7 @@ function CAccentBreve() ...@@ -312,7 +312,7 @@ function CAccentBreve()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CAccentBreve, CGlyphOperator); Asc.extendClass(CAccentBreve, CGlyphOperator);
CAccentBreve.prototype.calcSize = function(stretch) CAccentBreve.prototype.calcSize = function(stretch)
{ {
var betta = this.Parent.Get_CompiledCtrPrp().FontSize/36; var betta = this.Parent.Get_CompiledCtrPrp().FontSize/36;
...@@ -528,7 +528,7 @@ function CAccent(props) ...@@ -528,7 +528,7 @@ function CAccent(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CAccent, CMathBase); Asc.extendClass(CAccent, CMathBase);
CAccent.prototype.init = function(props) CAccent.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
......
...@@ -44,7 +44,7 @@ function CMathBase(bInside) ...@@ -44,7 +44,7 @@ function CMathBase(bInside)
this.bInside = bInside === true ? true: false; this.bInside = bInside === true ? true: false;
this.elements = new Array(); this.elements = [];
this.dW = 0; //column gap, gap width this.dW = 0; //column gap, gap width
this.dH = 0; //row gap, gap height this.dH = 0; //row gap, gap height
...@@ -93,7 +93,7 @@ CMathBase.prototype = ...@@ -93,7 +93,7 @@ CMathBase.prototype =
for(var j=0; j < this.nRow; j++) for(var j=0; j < this.nRow; j++)
{ {
this.elements[j] = new Array(); this.elements[j] = [];
this.alignment.hgt[j] = MCJC_CENTER; this.alignment.hgt[j] = MCJC_CENTER;
} }
......
...@@ -26,7 +26,7 @@ function CBorderBox(props) ...@@ -26,7 +26,7 @@ function CBorderBox(props)
g_oTableId.Add(this, this.Id); g_oTableId.Add(this, this.Id);
} }
extend(CBorderBox, CMathBase); Asc.extendClass(CBorderBox, CMathBase);
CBorderBox.prototype.init = function(props) CBorderBox.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
...@@ -445,7 +445,7 @@ function CBox(props) ...@@ -445,7 +445,7 @@ function CBox(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CBox, CMathBase); Asc.extendClass(CBox, CMathBase);
CBox.prototype.init = function(props) CBox.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
...@@ -602,7 +602,7 @@ function CBar(props) ...@@ -602,7 +602,7 @@ function CBar(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CBar, CCharacter); Asc.extendClass(CBar, CCharacter);
CBar.prototype.init = function(props) CBar.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
...@@ -738,7 +738,7 @@ function CPhantom(props) ...@@ -738,7 +738,7 @@ function CPhantom(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CPhantom, CMathBase); Asc.extendClass(CPhantom, CMathBase);
CPhantom.prototype.init = function(props) CPhantom.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
......
...@@ -20,7 +20,7 @@ function CDegree(props, bInside) ...@@ -20,7 +20,7 @@ function CDegree(props, bInside)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CDegree, CMathBase); Asc.extendClass(CDegree, CMathBase);
CDegree.prototype.init = function(props) CDegree.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
...@@ -332,7 +332,7 @@ function CIterators() ...@@ -332,7 +332,7 @@ function CIterators()
this.upper = 0; // смещение сверху для позиции основания this.upper = 0; // смещение сверху для позиции основания
CMathBase.call(this, true); CMathBase.call(this, true);
} }
extend(CIterators, CMathBase); Asc.extendClass(CIterators, CMathBase);
CIterators.prototype.init = function() CIterators.prototype.init = function()
{ {
this.setDimension(2, 1); this.setDimension(2, 1);
...@@ -497,7 +497,7 @@ function CDegreeSubSup(props, bInside) ...@@ -497,7 +497,7 @@ function CDegreeSubSup(props, bInside)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CDegreeSubSup, CMathBase); Asc.extendClass(CDegreeSubSup, CMathBase);
CDegreeSubSup.prototype.init = function(props) CDegreeSubSup.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
......
...@@ -19,7 +19,7 @@ function CFraction(props) ...@@ -19,7 +19,7 @@ function CFraction(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CFraction, CMathBase); Asc.extendClass(CFraction, CMathBase);
CFraction.prototype.init = function(props) CFraction.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
...@@ -475,7 +475,7 @@ function CNumerator() ...@@ -475,7 +475,7 @@ function CNumerator()
this.init(); this.init();
} }
extend(CNumerator, CMathBase); Asc.extendClass(CNumerator, CMathBase);
CNumerator.prototype.init = function() CNumerator.prototype.init = function()
{ {
this.setDimension(1, 1); this.setDimension(1, 1);
...@@ -533,7 +533,7 @@ function CDenominator() ...@@ -533,7 +533,7 @@ function CDenominator()
this.init(); this.init();
} }
extend(CDenominator, CMathBase); Asc.extendClass(CDenominator, CMathBase);
CDenominator.prototype.init = function() CDenominator.prototype.init = function()
{ {
this.setDimension(1, 1); this.setDimension(1, 1);
......
...@@ -21,22 +21,12 @@ function CLimit(props) ...@@ -21,22 +21,12 @@ function CLimit(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CLimit, CMathBase); Asc.extendClass(CLimit, CMathBase);
CLimit.prototype.init = function(props) CLimit.prototype.init = function(props)
{ {
// посмотреть GetAllFonts // посмотреть GetAllFonts
this.setProperties(props); this.setProperties(props);
} }
CLimit.prototype.getAscent = function()
{
var ascent;
if(this.Pr.type == LIMIT_LOW)
ascent = this.elements[0][0].size.ascent;
else if(this.Pr.type == LIMIT_UP)
ascent = this.elements[0][0].size.height + this.dH + this.elements[1][0].size.ascent;
return ascent;
}
CLimit.prototype.getFName = function() CLimit.prototype.getFName = function()
{ {
return this.FName; return this.FName;
...@@ -74,7 +64,7 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -74,7 +64,7 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
if(this.RecalcInfo.bProps == true || RPI.bChangeInline == true) if(this.RecalcInfo.bProps == true || RPI.bChangeInline == true)
{ {
if(RPI.bInline == true) if(RPI.bInline == true && RPI.bMathFunc == true)
{ {
this.setDimension(1, 1); this.setDimension(1, 1);
...@@ -122,21 +112,70 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -122,21 +112,70 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
} }
if(RPI.bInline == true)
if(RPI.bInline == true && RPI.bMathFunc == true)
{ {
this.elements[0][0].Resize(oMeasure, this, ParaMath, RPI, ArgSize); this.elements[0][0].Resize(oMeasure, this, ParaMath, RPI, ArgSize);
this.size =
{
width: this.elements[0][0].size.width,
height: this.elements[0][0].size.height,
ascent: this.elements[0][0].size.ascent
};
} }
else else
{ {
//this.setDistance();
this.FName.Resize(oMeasure, this, ParaMath, RPI, ArgSize); this.FName.Resize(oMeasure, this, ParaMath, RPI, ArgSize);
var ArgSzIter = ArgSize.Copy(); var ArgSzIter = ArgSize.Copy();
ArgSzIter.decrease(); ArgSzIter.decrease();
this.Iterator.Resize(oMeasure, this, ParaMath, RPI, ArgSzIter); this.Iterator.Resize(oMeasure, this, ParaMath, RPI, ArgSzIter);
var SizeFName = this.FName.size,
SizeIter = this.Iterator.size;
var width = SizeFName.width > SizeIter.width ? SizeFName.width : SizeIter.width,
height = SizeFName.height + SizeIter.height + this.dH,
ascent;
if(this.Pr.type == LIMIT_LOW)
ascent = SizeFName.ascent;
else if(this.Pr.type == LIMIT_UP)
ascent = SizeIter.height + this.dH + SizeFName.ascent;
width += this.GapLeft + this.GapRight;
/*var width = 0;
var height = 0;
var maxWH = this.getWidthsHeights();
this.setDistance();
var Widths = maxWH.widths;
var Heights = maxWH.heights;
for( var j = 0 ; j < this.nRow; j++ )
height += Heights[j];
height += this.dH*(this.nRow - 1);
for(var i=0; i < this.nCol ; i++)
width += Widths[i];
width += this.dW*(this.nCol - 1) + this.GapLeft + this.GapRight;
var ascent = this.getAscent(oMeasure);*/
this.size = {width: width, height: height, ascent: ascent};
} }
this.recalculateSize(oMeasure);
} }
CLimit.prototype.getPropsForWrite = function() CLimit.prototype.getPropsForWrite = function()
{ {
...@@ -193,12 +232,21 @@ function CMathFunc(props) ...@@ -193,12 +232,21 @@ function CMathFunc(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CMathFunc, CMathBase); Asc.extendClass(CMathFunc, CMathBase);
CMathFunc.prototype.init = function(props) CMathFunc.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
this.fillContent(); this.fillContent();
} }
CMathFunc.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
{
RPI.bMathFunc = true;
CMathFunc.superclass.Resize.call(this, oMeasure, Parent, ParaMath, RPI, ArgSize);
RPI.bMathFunc = false;
}
CMathFunc.prototype.setDistance = function() CMathFunc.prototype.setDistance = function()
{ {
this.dW = this.Get_CompiledCtrPrp().FontSize/6*g_dKoef_pt_to_mm; this.dW = this.Get_CompiledCtrPrp().FontSize/6*g_dKoef_pt_to_mm;
......
...@@ -42,6 +42,7 @@ function CRPI() ...@@ -42,6 +42,7 @@ function CRPI()
this.bChangeInline = false; this.bChangeInline = false;
this.bNaryInline = false; /*для CDegreeSupSub внутри N-арного оператора, этот флаг необходим, чтобы итераторы максимально близко друг к другу расположить*/ this.bNaryInline = false; /*для CDegreeSupSub внутри N-арного оператора, этот флаг необходим, чтобы итераторы максимально близко друг к другу расположить*/
this.bEqqArray = false; /*для амперсанда*/ this.bEqqArray = false; /*для амперсанда*/
this.bMathFunc = false;
} }
CRPI.prototype.Copy = function() CRPI.prototype.Copy = function()
...@@ -53,15 +54,11 @@ CRPI.prototype.Copy = function() ...@@ -53,15 +54,11 @@ CRPI.prototype.Copy = function()
RPI.bChangeInline = this.bChangeInline; RPI.bChangeInline = this.bChangeInline;
RPI.bNaryInline = this.bNaryInline; RPI.bNaryInline = this.bNaryInline;
RPI.bEqqArray = this.bEqqArray; RPI.bEqqArray = this.bEqqArray;
RPI.bMathFunc = this.bMathFunc;
return RPI; return RPI;
} }
/*function CMathPosInfo()
{
this.Widths = [];
this.Points = [];
}*/
function CMathPosInfo() function CMathPosInfo()
{ {
...@@ -90,39 +87,7 @@ CMathPosInfo.prototype.UpdatePoint = function() ...@@ -90,39 +87,7 @@ CMathPosInfo.prototype.UpdatePoint = function()
this.bEven = true; this.bEven = true;
} }
} }
CMathPosInfo.prototype.old_old_ApplyAlign = function() CMathPosInfo.prototype.ApplyAlign = function()
{
var align = 0;
if(this.bEven)
{
var alignEven, alignGeneral;
var Len = this.ContentPoints.length,
Point = this.ContentPoints[this.CurrPoint];
var GWidth = this.GWidths[this.CurrPoint],
GPoint = this.GPoints[this.CurrPoint];
if(this.CurrPoint == Len - 1 && Point.odd == -1) // то есть последняя точка четная, выравнивание по центру
{
alignGeneral = (GWidth - Point.even)/2;
alignEven = 0;
}
else
{
alignEven = (GWidth - GPoint.even - GPoint.odd)/2;
alignGeneral = GPoint.even - Point.even;
}
align = alignGeneral + alignEven;
}
this.x += align;
}
CMathPosInfo.prototype.ApplyAlign = function() // нормальный расчет, без случая с Last элементом
{ {
var align = 0; var align = 0;
...@@ -136,61 +101,16 @@ CMathPosInfo.prototype.ApplyAlign = function() // нормальный расч ...@@ -136,61 +101,16 @@ CMathPosInfo.prototype.ApplyAlign = function() // нормальный расч
var GWidth = this.GWidths[this.CurrPoint], var GWidth = this.GWidths[this.CurrPoint],
GPoint = this.GPoints[this.CurrPoint]; GPoint = this.GPoints[this.CurrPoint];
if(this.CurrPoint == Len - 1 && Point.odd == -1) // то есть последняя точка четная, выравнивание по центру
{
alignGeneral = (GWidth - Point.even)/2;
alignEven = 0;
}
else
{
alignGeneral = (GWidth - GPoint.even - GPoint.odd)/2;
alignEven = GPoint.even - Point.even;
}
if(this.CurrPoint > 0)
{
var PrevGenPoint = this.GPoints[this.CurrPoint-1],
PrevGenWidth = this.GWidths[this.CurrPoint-1],
PrevPoint = this.ContentPoints[this.CurrPoint-1];
var alignPrevGen = (PrevGenWidth - PrevGenPoint.even - PrevGenPoint.odd)/2;
alignOdd = alignPrevGen + PrevGenPoint.odd - PrevPoint.odd;
}
else
alignOdd = 0;
align = alignGeneral + alignEven + alignOdd;
}
this.x += align;
}
CMathPosInfo.prototype.new_ApplyAlign = function()
{
var align = 0;
if(this.bEven)
{
var alignEven, alignGeneral, alignOdd;
var Len = this.ContentPoints.length,
Point = this.ContentPoints[this.CurrPoint];
var GWidth = this.GWidths[this.CurrPoint],
GPoint = this.GPoints[this.CurrPoint];
if(this.CurrPoint == Len - 1 && Point.odd == -1) // то есть последняя точка четная, выравнивание по центру if(this.CurrPoint == Len - 1 && Point.odd == -1) // то есть последняя точка четная, выравнивание по центру
{ {
var GMaxDimWidth = this.GMaxDimWidths[this.CurrPoint]; var GMaxDimWidth = this.GMaxDimWidths[this.CurrPoint];
alignGeneral = (GMaxDimWidth - Point.even)/2; // для Last элемента alignGeneral = (GMaxDimWidth - Point.even)/2;
alignEven = 0; alignEven = 0;
} }
else else
{ {
alignGeneral = (GWidth - GPoint.even - GPoint.odd)/2; // для случая, когда у Last элемента максимальная ширина для данного отрезка выравнивания alignGeneral = (GWidth - GPoint.even - GPoint.odd)/2;
//alignGeneral = (GWidth - Point.even - Point.odd)/2;
alignEven = GPoint.even - Point.even; alignEven = GPoint.even - Point.even;
} }
...@@ -200,7 +120,7 @@ CMathPosInfo.prototype.new_ApplyAlign = function() ...@@ -200,7 +120,7 @@ CMathPosInfo.prototype.new_ApplyAlign = function()
PrevGenWidth = this.GWidths[this.CurrPoint-1], PrevGenWidth = this.GWidths[this.CurrPoint-1],
PrevPoint = this.ContentPoints[this.CurrPoint-1]; PrevPoint = this.ContentPoints[this.CurrPoint-1];
var alignPrevGen = (PrevGenWidth - PrevPoint.even - PrevPoint.odd)/2; var alignPrevGen = (PrevGenWidth - PrevGenPoint.even - PrevGenPoint.odd)/2;
alignOdd = alignPrevGen + PrevGenPoint.odd - PrevPoint.odd; alignOdd = alignPrevGen + PrevGenPoint.odd - PrevPoint.odd;
} }
else else
...@@ -227,50 +147,6 @@ function AmperWidths() ...@@ -227,50 +147,6 @@ function AmperWidths()
this.bEven = true; // является ли текущая точка нечетной this.bEven = true; // является ли текущая точка нечетной
this.Widths = []; this.Widths = [];
} }
/*AmperWidths.prototype.UpdatePoints = function(value)
{
if(this.bEven)
{
this.CurrPoint++;
var NewPoint = new CMathPoint();
NewPoint.even = value;
this.Widths.push(NewPoint);
this.bEven = false;
}
else
{
var len = this.Widths.length;
this.Widths[len-1].odd = value;
this.bEven = true;
}
}
AmperWidths.prototype.AddToCurrentPoint = function(value)
{
var len = this.Widths.length;
if(len == 0)
{
this.UpdatePoints(value);
this.bEven = true;
}
else
{
if(this.bEven) // текущая точка нечетная
{
if(this.Widths[len-1].even != -1)
this.Widths[len-1].even += value;
else
this.Widths[len-1].even = value;
}
else // текущая точка четная
{
if(this.Widths[len-1].odd != -1)
this.Widths[len-1].odd += value;
else
this.Widths[len-1].odd = value;
}
}
}*/
AmperWidths.prototype.UpdatePoint = function(value) AmperWidths.prototype.UpdatePoint = function(value)
{ {
var len = this.Widths.length; var len = this.Widths.length;
...@@ -455,10 +331,6 @@ CMathArgSize.prototype = ...@@ -455,10 +331,6 @@ CMathArgSize.prototype =
} }
} }
// TODO
// проконтролировать GapLeft и GapRight для setPosition всех элементов
function CMathGapsInfo(oMeasure, Parent, argSize) function CMathGapsInfo(oMeasure, Parent, argSize)
{ {
this.measure = oMeasure; this.measure = oMeasure;
...@@ -4104,10 +3976,8 @@ CMathContent.prototype = ...@@ -4104,10 +3976,8 @@ CMathContent.prototype =
this.Parent = Parent; this.Parent = Parent;
} }
var GapsInfo = new CMathGapsInfo(oMeasure, this, this.Compiled_ArgSz.value); var GapsInfo = new CMathGapsInfo(oMeasure, this, this.Compiled_ArgSz.value);
if (!this.bRoot && this.content.length == 0) if (!this.bRoot && this.content.length == 0)
this.fillPlaceholders(); this.fillPlaceholders();
...@@ -4119,10 +3989,6 @@ CMathContent.prototype = ...@@ -4119,10 +3989,6 @@ CMathContent.prototype =
this.size.SetZero(); this.size.SetZero();
/*var bManyRuns = RPI.bEqqArray == true && this.content.length > 1;
if(bManyRuns)
var temp = true;*/
this.WidthPoints = new AmperWidths(); this.WidthPoints = new AmperWidths();
for(var pos = 0; pos < lng; pos++) for(var pos = 0; pos < lng; pos++)
...@@ -4305,16 +4171,6 @@ CMathContent.prototype = ...@@ -4305,16 +4171,6 @@ CMathContent.prototype =
this.pos.x = PosInfo.x; this.pos.x = PosInfo.x;
this.pos.y = PosInfo.y; this.pos.y = PosInfo.y;
/*var x = pos.x,
y = pos.y + this.size.ascent; */
//this.WidthPoints.CurrPoint = 0;
//this.WidthPoints.Amp = 1;
/*var NewPos = new CMathPosition();
NewPos.x = pos.x;
NewPos.y = pos.y + this.size.ascent; // y по baseline;*/
var NewPosInfo = new CMathPosInfo(); var NewPosInfo = new CMathPosInfo();
NewPosInfo.x = this.pos.x; NewPosInfo.x = this.pos.x;
NewPosInfo.y = this.pos.y + this.size.ascent; NewPosInfo.y = this.pos.y + this.size.ascent;
...@@ -4329,6 +4185,11 @@ CMathContent.prototype = ...@@ -4329,6 +4185,11 @@ CMathContent.prototype =
NewPosInfo.ApplyAlign(); NewPosInfo.ApplyAlign();
} }
var ConsoleY = PosInfo.y + this.size.ascent,
id = this.Id;
console.log("" + id + " : " + ConsoleY);
for(var i=0; i < this.content.length; i++) for(var i=0; i < this.content.length; i++)
{ {
...@@ -4339,10 +4200,6 @@ CMathContent.prototype = ...@@ -4339,10 +4200,6 @@ CMathContent.prototype =
} }
else else
{ {
/*var NewPos = new CMathPosition();
NewPos.x = pos.x;
NewPos.y = pos.y + this.size.ascent; // y по baseline;*/
this.content[i].setPosition(NewPosInfo); this.content[i].setPosition(NewPosInfo);
NewPosInfo.UpdateX(this.content[i].size.width); NewPosInfo.UpdateX(this.content[i].size.width);
} }
...@@ -4360,35 +4217,10 @@ CMathContent.prototype = ...@@ -4360,35 +4217,10 @@ CMathContent.prototype =
this.plhHide = flag; this.plhHide = flag;
}, },
///////// RunPrp, CtrPrp ///////// RunPrp, CtrPrp
old_getFirstRPrp: function(ParaMath)
{
//var rPrp = new CMathRunPrp();
var rPrp = new CTextPr();
var defaultRPrp = ParaMath.Get_Default_TPrp();
rPrp.Merge(defaultRPrp);
if(this.content.length > 1)
{
// первый объект всегда para_Math_Run
this.content[0].Get_CompiledPr(true);
}
return rPrp;
},
getFirstRPrp: function(ParaMath) getFirstRPrp: function(ParaMath)
{ {
return this.content[0].Get_CompiledPr(true); return this.content[0].Get_CompiledPr(true);
}, },
/*increaseArgSize: function()
{
if(this.argSize < 2)
this.argSize++;
},
decreaseArgSize: function()
{
if( this.argSize > -2 )
this.argSize--;
},*/
GetCtrPrp: function() // for placeholder GetCtrPrp: function() // for placeholder
{ {
var ctrPrp = new CTextPr(); var ctrPrp = new CTextPr();
......
...@@ -25,7 +25,7 @@ function CMathMatrix(props) ...@@ -25,7 +25,7 @@ function CMathMatrix(props)
rSp: 0, rSp: 0,
rSpRule: 0, rSpRule: 0,
mcs: new Array(), mcs: [],
baseJc: BASEJC_CENTER, baseJc: BASEJC_CENTER,
plcHide: false plcHide: false
}; };
...@@ -45,7 +45,7 @@ function CMathMatrix(props) ...@@ -45,7 +45,7 @@ function CMathMatrix(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CMathMatrix, CMathBase); Asc.extendClass(CMathMatrix, CMathBase);
CMathMatrix.prototype.init = function(props) CMathMatrix.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
...@@ -673,7 +673,7 @@ function CEqArray(props) ...@@ -673,7 +673,7 @@ function CEqArray(props)
rSp: 0, rSp: 0,
rSpRule: 0, rSpRule: 0,
mcs: new Array(), mcs: [],
baseJc: BASEJC_CENTER, baseJc: BASEJC_CENTER,
plcHide: false plcHide: false
}; };
...@@ -703,7 +703,7 @@ function CEqArray(props) ...@@ -703,7 +703,7 @@ function CEqArray(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CEqArray, CMathMatrix); Asc.extendClass(CEqArray, CMathMatrix);
CEqArray.prototype.init = function(props) CEqArray.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
...@@ -734,7 +734,7 @@ CEqArray.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize) ...@@ -734,7 +734,7 @@ CEqArray.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
//CEqArray.superclass.Resize.call(this, oMeasure, Parent, ParaMath, RPI, ArgSize); //CEqArray.superclass.Resize.call(this, oMeasure, Parent, ParaMath, RPI, ArgSize);
} }
CEqArray.prototype._getMetrics = function(RPI) CEqArray.prototype.getMetrics = function(RPI)
{ {
var AscentsMetrics = []; var AscentsMetrics = [];
var DescentsMetrics = []; var DescentsMetrics = [];
...@@ -755,6 +755,7 @@ CEqArray.prototype._getMetrics = function(RPI) ...@@ -755,6 +755,7 @@ CEqArray.prototype._getMetrics = function(RPI)
this.WidthsPoints.length = 0; this.WidthsPoints.length = 0;
this.Points.length = 0; this.Points.length = 0;
this.MaxDimWidths.length = 0;
WidthsMetrics[0] = 0; WidthsMetrics[0] = 0;
...@@ -780,7 +781,6 @@ CEqArray.prototype._getMetrics = function(RPI) ...@@ -780,7 +781,6 @@ CEqArray.prototype._getMetrics = function(RPI)
{ {
maxDim = WidthsRow[Pos].even < WidthsRow[Pos].odd ? WidthsRow[Pos].odd : WidthsRow[Pos].even; maxDim = WidthsRow[Pos].even < WidthsRow[Pos].odd ? WidthsRow[Pos].odd : WidthsRow[Pos].even;
maxDimWidth = WidthsRow[Pos].even + WidthsRow[Pos].odd; maxDimWidth = WidthsRow[Pos].even + WidthsRow[Pos].odd;
//this.WidthsPoints[Pos] = WidthsRow[Pos].even + WidthsRow[Pos].odd;
} }
even = even > WidthsRow[Pos].even ? even : WidthsRow[Pos].even; // before "odd" even = even > WidthsRow[Pos].even ? even : WidthsRow[Pos].even; // before "odd"
odd = odd > WidthsRow[Pos].odd ? odd : WidthsRow[Pos].odd; // after "odd" odd = odd > WidthsRow[Pos].odd ? odd : WidthsRow[Pos].odd; // after "odd"
...@@ -791,7 +791,6 @@ CEqArray.prototype._getMetrics = function(RPI) ...@@ -791,7 +791,6 @@ CEqArray.prototype._getMetrics = function(RPI)
{ {
maxDim = WidthsRow[Pos].even; maxDim = WidthsRow[Pos].even;
maxDimWidth = maxDim; maxDimWidth = maxDim;
//this.WidthsPoints[Pos] = maxDim;
} }
last = last > WidthsRow[Pos].even ? last: WidthsRow[Pos].even; last = last > WidthsRow[Pos].even ? last: WidthsRow[Pos].even;
} }
...@@ -799,12 +798,6 @@ CEqArray.prototype._getMetrics = function(RPI) ...@@ -799,12 +798,6 @@ CEqArray.prototype._getMetrics = function(RPI)
if(Pos == len - 1) if(Pos == len - 1)
EndWidths++; EndWidths++;
} }
/*if(Pos == len && len == 0) // для контентов без точек выравнивания
{
last =
EndWidths++;
}*/
} }
var w = even + odd > last ? even + odd : last; var w = even + odd > last ? even + odd : last;
...@@ -822,18 +815,6 @@ CEqArray.prototype._getMetrics = function(RPI) ...@@ -822,18 +815,6 @@ CEqArray.prototype._getMetrics = function(RPI)
Pos++; Pos++;
} }
/*if(true)
{
var str = "";
for(var i = 0; i < this.WidthsPoints.length; i++)
{
var num = this.WidthsPoints[i].toFixed(3);
str += num + " ";
}
console.log(str);
}*/
for(var i = 0; i < this.nRow; i++) for(var i = 0; i < this.nRow; i++)
{ {
...@@ -862,242 +843,6 @@ CEqArray.prototype._getMetrics = function(RPI) ...@@ -862,242 +843,6 @@ CEqArray.prototype._getMetrics = function(RPI)
return {ascents: AscentsMetrics, descents: DescentsMetrics, widths: WidthsMetrics}; return {ascents: AscentsMetrics, descents: DescentsMetrics, widths: WidthsMetrics};
} }
CEqArray.prototype.getMetrics = function(RPI) // нормальный расчет, без случая с Last элементом
{
var AscentsMetrics = [];
var DescentsMetrics = [];
var WidthsMetrics = [];
// нумерация начинается с нуля, поэтому все четные точки идут с нечетными номерами в массиве
//var lngW = RPI.Widths.length; // this.nRow
var EndWidths = 0;
var even, // четная точка
odd, // нечетная точка
last;
var Pos = 0;
this.WidthsPoints.length = 0;
this.Points.length = 0;
WidthsMetrics[0] = 0;
while(EndWidths < this.nRow)
{
even = 0;
odd = 0;
last = 0;
for(var i = 0; i < this.nRow; i++)
{
var WidthsRow = this.elements[i][0].WidthPoints.Widths,
len = WidthsRow.length;
if(Pos < len)
{
if(WidthsRow[Pos].odd !== -1)
{
even = even > WidthsRow[Pos].even ? even : WidthsRow[Pos].even; // before "odd"
odd = odd > WidthsRow[Pos].odd ? odd : WidthsRow[Pos].odd; // after "odd"
}
else
{
last = last > WidthsRow[Pos].even ? last: WidthsRow[Pos].even;
}
if(Pos == len - 1)
EndWidths++;
}
/*if(Pos == len && len == 0) // для контентов без точек выравнивания
{
last =
EndWidths++;
}*/
}
var w = even + odd > last ? even + odd : last;
var NewPoint = new CMathPoint();
NewPoint.even = even;
NewPoint.odd = odd;
this.WidthsPoints.push(w);
this.Points.push(NewPoint);
WidthsMetrics[0] += w;
Pos++;
}
/*if(true)
{
var str = "";
for(var i = 0; i < this.WidthsPoints.length; i++)
{
var num = this.WidthsPoints[i].toFixed(3);
str += num + " ";
}
console.log(str);
}*/
for(var i = 0; i < this.nRow; i++)
{
var size = this.elements[i][0].size;
AscentsMetrics[i] = size.ascent;
DescentsMetrics[i] = size.height - size.ascent;
}
/*for(var tt = 0; tt < this.nCol; tt++ )
Widths[tt] = 0;
for(var i=0; i < this.nRow; i++)
{
Ascents[i] = 0;
Descents[i] = 0;
for(var j = 0; j < this.nCol ; j++)
{
var size = this.elements[i][j].size;
Widths[j] = i > 0 && ( Widths[j] > size.width ) ? Widths[j] : size.width;
Ascents[i] = (Ascents[i] > size.ascent ) ? Ascents[i] : size.ascent;
Descents[i] = (Descents[i] > size.height - size.ascent ) ? Descents[i] : size.height - size.ascent;
}
}*/
return {ascents: AscentsMetrics, descents: DescentsMetrics, widths: WidthsMetrics};
}
CEqArray.prototype.new_getMetrics = function(RPI)
{
var AscentsMetrics = [];
var DescentsMetrics = [];
var WidthsMetrics = [];
// нумерация начинается с нуля, поэтому все четные точки идут с нечетными номерами в массиве
//var lngW = RPI.Widths.length; // this.nRow
var EndWidths = 0;
var even, // четная точка
odd, // нечетная точка
last,
maxDim;
var Pos = 0;
this.WidthsPoints.length = 0;
this.Points.length = 0;
WidthsMetrics[0] = 0;
while(EndWidths < this.nRow)
{
even = 0;
odd = 0;
last = 0;
maxDim = 0;
for(var i = 0; i < this.nRow; i++)
{
var WidthsRow = this.elements[i][0].WidthPoints.Widths,
len = WidthsRow.length;
if(Pos < len)
{
if(WidthsRow[Pos].odd !== -1)
{
if(maxDim < WidthsRow[Pos].even || maxDim < WidthsRow[Pos].odd)
{
maxDim = WidthsRow[Pos].even < WidthsRow[Pos].odd ? WidthsRow[Pos].odd : WidthsRow[Pos].even;
this.WidthsPoints[Pos] = WidthsRow[Pos].even + WidthsRow[Pos].odd;
}
even = even > WidthsRow[Pos].even ? even : WidthsRow[Pos].even; // before "odd"
odd = odd > WidthsRow[Pos].odd ? odd : WidthsRow[Pos].odd; // after "odd"
}
else
{
if(maxDim < WidthsRow[Pos].even)
{
maxDim = WidthsRow[Pos].even;
this.WidthsPoints[Pos] = maxDim;
}
last = last > WidthsRow[Pos].even ? last: WidthsRow[Pos].even;
}
if(Pos == len - 1)
EndWidths++;
}
/*if(Pos == len && len == 0) // для контентов без точек выравнивания
{
last =
EndWidths++;
}*/
}
var w = even + odd > last ? even + odd : last;
var NewPoint = new CMathPoint();
NewPoint.even = even;
NewPoint.odd = odd;
//this.WidthsPoints.push(w);
this.Points.push(NewPoint);
WidthsMetrics[0] += w;
Pos++;
}
/*if(true)
{
var str = "";
for(var i = 0; i < this.WidthsPoints.length; i++)
{
var num = this.WidthsPoints[i].toFixed(3);
str += num + " ";
}
console.log(str);
}*/
for(var i = 0; i < this.nRow; i++)
{
var size = this.elements[i][0].size;
AscentsMetrics[i] = size.ascent;
DescentsMetrics[i] = size.height - size.ascent;
}
/*for(var tt = 0; tt < this.nCol; tt++ )
Widths[tt] = 0;
for(var i=0; i < this.nRow; i++)
{
Ascents[i] = 0;
Descents[i] = 0;
for(var j = 0; j < this.nCol ; j++)
{
var size = this.elements[i][j].size;
Widths[j] = i > 0 && ( Widths[j] > size.width ) ? Widths[j] : size.width;
Ascents[i] = (Ascents[i] > size.ascent ) ? Ascents[i] : size.ascent;
Descents[i] = (Descents[i] > size.height - size.ascent ) ? Descents[i] : size.height - size.ascent;
}
}*/
return {ascents: AscentsMetrics, descents: DescentsMetrics, widths: WidthsMetrics};
}
CEqArray.prototype.setPosition = function(pos) CEqArray.prototype.setPosition = function(pos)
{ {
//PosInfo.Widths = this.WidthsPoints; //PosInfo.Widths = this.WidthsPoints;
...@@ -1141,7 +886,7 @@ CEqArray.prototype.setProperties = function(props) ...@@ -1141,7 +886,7 @@ CEqArray.prototype.setProperties = function(props)
if(props.objDist !== "undefined" && props.objDist !== null) if(props.objDist !== "undefined" && props.objDist !== null)
this.Pr.objDist = props.objDist; this.Pr.objDist = props.objDist;
var mcs = new Array(); var mcs = [];
mcs.push(new CMColumsPr()); mcs.push(new CMColumsPr());
var Pr = var Pr =
......
...@@ -33,7 +33,7 @@ function CNary(props) ...@@ -33,7 +33,7 @@ function CNary(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CNary, CMathBase); Asc.extendClass(CNary, CMathBase);
CNary.prototype.init = function(props) CNary.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
...@@ -463,7 +463,7 @@ function CNaryUnd(bInside) ...@@ -463,7 +463,7 @@ function CNaryUnd(bInside)
this.setDimension(2, 1); this.setDimension(2, 1);
//this.init(); //this.init();
} }
extend(CNaryUnd, CMathBase); Asc.extendClass(CNaryUnd, CMathBase);
/*CNaryUnd.prototype.old_init = function() /*CNaryUnd.prototype.old_init = function()
{ {
this.setDimension(2,1); this.setDimension(2,1);
...@@ -516,7 +516,7 @@ function CNaryOvr(bInside) ...@@ -516,7 +516,7 @@ function CNaryOvr(bInside)
this.setDimension(2, 1); this.setDimension(2, 1);
} }
extend(CNaryOvr, CMathBase); Asc.extendClass(CNaryOvr, CMathBase);
/*CNaryOvr.prototype.old_init = function() /*CNaryOvr.prototype.old_init = function()
{ {
this.setDimension(2,1); this.setDimension(2,1);
...@@ -591,7 +591,7 @@ function CNaryUndOvr(bInside) ...@@ -591,7 +591,7 @@ function CNaryUndOvr(bInside)
this.setDimension(3,1); this.setDimension(3,1);
} }
extend(CNaryUndOvr, CMathBase); Asc.extendClass(CNaryUndOvr, CMathBase);
/*CNaryUndOvr.prototype.old_init = function(oSign) /*CNaryUndOvr.prototype.old_init = function(oSign)
{ {
this.setDimension(3,1); this.setDimension(3,1);
...@@ -810,7 +810,7 @@ function CSigma() ...@@ -810,7 +810,7 @@ function CSigma()
{ {
CNaryOperator.call(this); CNaryOperator.call(this);
} }
extend(CSigma, CNaryOperator); Asc.extendClass(CSigma, CNaryOperator);
CSigma.prototype.drawPath = function(pGraphics, XX, YY) CSigma.prototype.drawPath = function(pGraphics, XX, YY)
{ {
pGraphics._m(XX[0], YY[0]); pGraphics._m(XX[0], YY[0]);
...@@ -1011,7 +1011,7 @@ function CProduct(bFlip) ...@@ -1011,7 +1011,7 @@ function CProduct(bFlip)
{ {
CNaryOperator.call(this, bFlip); CNaryOperator.call(this, bFlip);
} }
extend(CProduct, CNaryOperator); Asc.extendClass(CProduct, CNaryOperator);
CProduct.prototype.drawPath = function(pGraphics, XX, YY) CProduct.prototype.drawPath = function(pGraphics, XX, YY)
{ {
pGraphics._m(XX[0], YY[0]); pGraphics._m(XX[0], YY[0]);
...@@ -1176,7 +1176,7 @@ function CUnion(bFlip) ...@@ -1176,7 +1176,7 @@ function CUnion(bFlip)
{ {
CNaryOperator.call(this, bFlip); CNaryOperator.call(this, bFlip);
} }
extend(CUnion, CNaryOperator); Asc.extendClass(CUnion, CNaryOperator);
CUnion.prototype.drawPath = function(pGraphics, XX, YY) CUnion.prototype.drawPath = function(pGraphics, XX, YY)
{ {
pGraphics._m(XX[0], YY[0]); pGraphics._m(XX[0], YY[0]);
...@@ -1245,7 +1245,7 @@ function CLogicalOr(bFlip) ...@@ -1245,7 +1245,7 @@ function CLogicalOr(bFlip)
{ {
CNaryOperator.call(this, bFlip); CNaryOperator.call(this, bFlip);
} }
extend(CLogicalOr, CNaryOperator); Asc.extendClass(CLogicalOr, CNaryOperator);
CLogicalOr.prototype.drawPath = function(pGraphics, XX, YY) CLogicalOr.prototype.drawPath = function(pGraphics, XX, YY)
{ {
pGraphics._m(XX[0], YY[0]); pGraphics._m(XX[0], YY[0]);
...@@ -1397,7 +1397,7 @@ function CIntegral() ...@@ -1397,7 +1397,7 @@ function CIntegral()
{ {
CNaryOperator.call(this); CNaryOperator.call(this);
} }
extend(CIntegral, CNaryOperator); Asc.extendClass(CIntegral, CNaryOperator);
CIntegral.prototype.getCoord = function() CIntegral.prototype.getCoord = function()
{ {
var X = [], var X = [],
...@@ -1627,7 +1627,7 @@ function CDoubleIntegral() ...@@ -1627,7 +1627,7 @@ function CDoubleIntegral()
{ {
CIntegral.call(this); CIntegral.call(this);
} }
extend(CDoubleIntegral, CIntegral); Asc.extendClass(CDoubleIntegral, CIntegral);
CDoubleIntegral.prototype.drawPath = function(pGraphics, XX, YY) CDoubleIntegral.prototype.drawPath = function(pGraphics, XX, YY)
{ {
// XX[9] - ширина // XX[9] - ширина
...@@ -1668,7 +1668,7 @@ function CTripleIntegral() ...@@ -1668,7 +1668,7 @@ function CTripleIntegral()
{ {
CIntegral.call(this); CIntegral.call(this);
} }
extend(CTripleIntegral, CIntegral); Asc.extendClass(CTripleIntegral, CIntegral);
CTripleIntegral.prototype.drawPath = function(pGraphics, XX, YY) CTripleIntegral.prototype.drawPath = function(pGraphics, XX, YY)
{ {
// XX[9] - ширина // XX[9] - ширина
...@@ -2046,7 +2046,7 @@ function CContourIntegral() ...@@ -2046,7 +2046,7 @@ function CContourIntegral()
{ {
CNaryOperator.call(this); CNaryOperator.call(this);
} }
extend(CContourIntegral, CNaryOperator); Asc.extendClass(CContourIntegral, CNaryOperator);
CContourIntegral.prototype.draw = function(x, y, pGraphics) CContourIntegral.prototype.draw = function(x, y, pGraphics)
{ {
var circle = new CCircle(); var circle = new CCircle();
...@@ -2132,7 +2132,7 @@ function CSurfaceIntegral() ...@@ -2132,7 +2132,7 @@ function CSurfaceIntegral()
{ {
CNaryOperator.call(this); CNaryOperator.call(this);
} }
extend(CSurfaceIntegral, CNaryOperator); Asc.extendClass(CSurfaceIntegral, CNaryOperator);
CSurfaceIntegral.prototype.draw = function(x, y, pGraphics) CSurfaceIntegral.prototype.draw = function(x, y, pGraphics)
{ {
var surf = new CSurface(); var surf = new CSurface();
...@@ -2216,7 +2216,7 @@ function CVolumeIntegral() ...@@ -2216,7 +2216,7 @@ function CVolumeIntegral()
{ {
CNaryOperator.call(this); CNaryOperator.call(this);
} }
extend(CVolumeIntegral, CNaryOperator); Asc.extendClass(CVolumeIntegral, CNaryOperator);
CVolumeIntegral.prototype.draw = function(x, y, pGraphics) CVolumeIntegral.prototype.draw = function(x, y, pGraphics)
{ {
var volume = new CVolume(); var volume = new CVolume();
......
...@@ -416,7 +416,7 @@ function COperatorBracket() ...@@ -416,7 +416,7 @@ function COperatorBracket()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(COperatorBracket, CGlyphOperator); Asc.extendClass(COperatorBracket, CGlyphOperator);
COperatorBracket.prototype.calcSize = function( stretch ) COperatorBracket.prototype.calcSize = function( stretch )
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -934,7 +934,7 @@ function COperatorParenthesis() ...@@ -934,7 +934,7 @@ function COperatorParenthesis()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(COperatorParenthesis, CGlyphOperator); Asc.extendClass(COperatorParenthesis, CGlyphOperator);
COperatorParenthesis.prototype.calcSize = function(stretch) COperatorParenthesis.prototype.calcSize = function(stretch)
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -1065,7 +1065,7 @@ function COperatorAngleBracket() ...@@ -1065,7 +1065,7 @@ function COperatorAngleBracket()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(COperatorAngleBracket, CGlyphOperator); Asc.extendClass(COperatorAngleBracket, CGlyphOperator);
COperatorAngleBracket.prototype.calcSize = function(stretch) COperatorAngleBracket.prototype.calcSize = function(stretch)
{ {
//скобка перевернутая //скобка перевернутая
...@@ -1176,7 +1176,7 @@ function CSquareBracket() ...@@ -1176,7 +1176,7 @@ function CSquareBracket()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CSquareBracket, CGlyphOperator); Asc.extendClass(CSquareBracket, CGlyphOperator);
CSquareBracket.prototype.calcCoord = function(stretch) CSquareBracket.prototype.calcCoord = function(stretch)
{ {
var X = [], var X = [],
...@@ -1247,7 +1247,7 @@ function CHalfSquareBracket() ...@@ -1247,7 +1247,7 @@ function CHalfSquareBracket()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CHalfSquareBracket, CGlyphOperator); Asc.extendClass(CHalfSquareBracket, CGlyphOperator);
CHalfSquareBracket.prototype.calcCoord = function(stretch) CHalfSquareBracket.prototype.calcCoord = function(stretch)
{ {
var X = [], var X = [],
...@@ -1315,7 +1315,7 @@ function COperatorLine() ...@@ -1315,7 +1315,7 @@ function COperatorLine()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(COperatorLine, CGlyphOperator); Asc.extendClass(COperatorLine, CGlyphOperator);
COperatorLine.prototype.setContent = function() COperatorLine.prototype.setContent = function()
{ {
COperatorLine.superclass.setContent.call(this, this.calcSize, this.calcCoord, this.drawPath); COperatorLine.superclass.setContent.call(this, this.calcSize, this.calcCoord, this.drawPath);
...@@ -1383,7 +1383,7 @@ function CWhiteSquareBracket() ...@@ -1383,7 +1383,7 @@ function CWhiteSquareBracket()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CWhiteSquareBracket, CGlyphOperator); Asc.extendClass(CWhiteSquareBracket, CGlyphOperator);
CWhiteSquareBracket.prototype.calcSize = function() CWhiteSquareBracket.prototype.calcSize = function()
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -1482,7 +1482,7 @@ function COperatorDoubleLine() ...@@ -1482,7 +1482,7 @@ function COperatorDoubleLine()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(COperatorDoubleLine, CGlyphOperator); Asc.extendClass(COperatorDoubleLine, CGlyphOperator);
COperatorDoubleLine.prototype.calcSize = function() COperatorDoubleLine.prototype.calcSize = function()
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -1559,7 +1559,7 @@ function CSingleArrow() ...@@ -1559,7 +1559,7 @@ function CSingleArrow()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CSingleArrow, CGlyphOperator); Asc.extendClass(CSingleArrow, CGlyphOperator);
CSingleArrow.prototype.calcSize = function() CSingleArrow.prototype.calcSize = function()
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -1635,7 +1635,7 @@ function CLeftRightArrow() ...@@ -1635,7 +1635,7 @@ function CLeftRightArrow()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CLeftRightArrow, CGlyphOperator); Asc.extendClass(CLeftRightArrow, CGlyphOperator);
CLeftRightArrow.prototype.calcSize = function() CLeftRightArrow.prototype.calcSize = function()
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -1724,7 +1724,7 @@ function CDoubleArrow() ...@@ -1724,7 +1724,7 @@ function CDoubleArrow()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CDoubleArrow, CGlyphOperator); Asc.extendClass(CDoubleArrow, CGlyphOperator);
CDoubleArrow.prototype.calcSize = function() CDoubleArrow.prototype.calcSize = function()
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -1823,7 +1823,7 @@ function CLR_DoubleArrow() ...@@ -1823,7 +1823,7 @@ function CLR_DoubleArrow()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CLR_DoubleArrow, CGlyphOperator); Asc.extendClass(CLR_DoubleArrow, CGlyphOperator);
CLR_DoubleArrow.prototype.calcSize = function() CLR_DoubleArrow.prototype.calcSize = function()
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -1934,7 +1934,7 @@ function CCombiningArrow() ...@@ -1934,7 +1934,7 @@ function CCombiningArrow()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CCombiningArrow, CGlyphOperator); Asc.extendClass(CCombiningArrow, CGlyphOperator);
CCombiningArrow.prototype.calcSize = function() CCombiningArrow.prototype.calcSize = function()
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -2004,7 +2004,7 @@ function CCombiningHalfArrow() ...@@ -2004,7 +2004,7 @@ function CCombiningHalfArrow()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CCombiningHalfArrow, CGlyphOperator); Asc.extendClass(CCombiningHalfArrow, CGlyphOperator);
CCombiningHalfArrow.prototype.calcSize = function() CCombiningHalfArrow.prototype.calcSize = function()
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -2070,7 +2070,7 @@ function CCombining_LR_Arrow() ...@@ -2070,7 +2070,7 @@ function CCombining_LR_Arrow()
{ {
CGlyphOperator.call(this); CGlyphOperator.call(this);
} }
extend(CCombining_LR_Arrow, CGlyphOperator); Asc.extendClass(CCombining_LR_Arrow, CGlyphOperator);
CCombining_LR_Arrow.prototype.calcSize = function() CCombining_LR_Arrow.prototype.calcSize = function()
{ {
var betta = this.getCtrPrp().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
...@@ -3277,7 +3277,7 @@ function CDelimiter(props) ...@@ -3277,7 +3277,7 @@ function CDelimiter(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CDelimiter, CMathBase); Asc.extendClass(CDelimiter, CMathBase);
CDelimiter.prototype.init = function(props) CDelimiter.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
...@@ -3916,7 +3916,7 @@ function CCharacter() ...@@ -3916,7 +3916,7 @@ function CCharacter()
CMathBase.call(this); CMathBase.call(this);
} }
extend(CCharacter, CMathBase); Asc.extendClass(CCharacter, CMathBase);
CCharacter.prototype.setCharacter = function(props, defaultProps) CCharacter.prototype.setCharacter = function(props, defaultProps)
{ {
this.operator.mergeProperties(props, defaultProps); this.operator.mergeProperties(props, defaultProps);
...@@ -4049,7 +4049,7 @@ function CGroupCharacter(props) ...@@ -4049,7 +4049,7 @@ function CGroupCharacter(props)
/// вызов этой функции обязательно в конце /// вызов этой функции обязательно в конце
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CGroupCharacter, CCharacter); Asc.extendClass(CGroupCharacter, CCharacter);
CGroupCharacter.prototype.init = function(props) CGroupCharacter.prototype.init = function(props)
{ {
......
...@@ -912,7 +912,7 @@ function CRadical(props) ...@@ -912,7 +912,7 @@ function CRadical(props)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
extend(CRadical, CMathBase); Asc.extendClass(CRadical, CMathBase);
CRadical.prototype.init = function(props) CRadical.prototype.init = function(props)
{ {
this.setProperties(props); this.setProperties(props);
......
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