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

Доработан argSize = -1 (в тч для CDegree) и gaps для CDegree

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54109 954022d7-b5bf-4e40-9824-e11837661b57
parent fb50de44
......@@ -47,8 +47,6 @@ CDegree.prototype.recalculateSup = function(oMeasure)
var mgCtrPrp = this.mergeCtrTPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, mgCtrPrp);
//this.dW = 0.216*shCenter;
var height = 0,
ascent = 0;
......@@ -78,15 +76,6 @@ CDegree.prototype.recalculateSup = function(oMeasure)
ascent = base.ascent;
}
this.dW = 0.2*shCenter;
/*var smallAsc = mgCtrPrp.FontSize*0.23;
if(base.ascent < smallAsc)
this.dW = 0.3*shCenter;
else
this.dW = 0.15*shCenter;*/
var width = base.width + iter.width + this.dW;
this.size = {width: width, height: height, ascent: ascent};
......@@ -104,8 +93,6 @@ CDegree.prototype.recalculateSubScript = function(oMeasure)
var mgCtrPrp = this.mergeCtrTPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, mgCtrPrp);
//this.dW = 0.216*shCenter;
this.dW = 0;
var width = base.width + iter.width + this.dW;
var low = 0;
......@@ -307,6 +294,19 @@ CDegree.prototype.getPropsForWrite = function()
return props;
}
CDegree.prototype.setDistance = function()
{
var mgCtrPrp = this.mergeCtrTPrp();
if(this.IsPlhIterator())
this.dW = 0.008*mgCtrPrp.FontSize;
else
this.dW = 0.02*mgCtrPrp.FontSize;
}
CDegree.prototype.IsPlhIterator = function()
{
return this.elements[0][1].IsPlaceholder();
}
function CIterators()
{
......
......@@ -4978,14 +4978,14 @@ CMathContent.prototype =
}
if(bSign && bLeftComp)
{
coeffLeft = coeffLeft - this.getGapsMComp(left).right;
}
if(bSign && bRightComp)
{
coeffRight = coeffRight - this.getGapsMComp(right).left;
}
coeffLeft = Math.ceil(coeffLeft*10)/10;
coeffRight = Math.ceil(coeffRight*10)/10;
}
else if(curr.typeObj == MATH_COMP)
{
......@@ -5033,9 +5033,6 @@ CMathContent.prototype =
}
coeffLeft = Math.ceil(coeffLeft*10)/10;
coeffRight = Math.ceil(coeffRight*10)/10;
var gapSign = 0.1513*wTextRPrp.FontSize;
this.content[posCurr].gaps.left = Math.ceil(coeffLeft*gapSign*10)/10; // если ни один случай не выполнился, выставляем "нулевые" gaps (default): необходимо, если что-то удалили и объект стал первый или последним в контенте
......@@ -5072,12 +5069,18 @@ CMathContent.prototype =
var coeffLeft = 0.001,
coeffRight = 0; // for checkGap.bEmptyGaps
var bDegree = kind == MATH_DEGREE || kind == MATH_DEGREESubSup;
if(checkGap.bChildGaps)
{
if(kind == MATH_DEGREE || kind == MATH_DEGREESubSup)
if(bDegree)
{
coeffLeft = 0.0;
coeffRight = 0.15;
coeffLeft = 0.03;
if(MComp.IsPlhIterator())
coeffRight = 0.12;
else
coeffRight = 0.16;
}
var gapsChild = MComp.getGapsInside();
......@@ -5088,7 +5091,8 @@ CMathContent.prototype =
else if(bNeedGap)
{
coeffLeft = 0.4;
coeffRight = 0.26;
//coeffRight = 0.26;
coeffRight = 0.3;
}
return {left: coeffLeft, right: coeffRight};
......@@ -6184,8 +6188,10 @@ CMathContent.prototype =
if(this.argSize == -1)
{
// aa: 0.0013 bb: 0.66 cc: 0.5
FSize = 0.001*FSize*FSize + 0.723*FSize - 1.318;
// aa: 0.0013 bb: 0.66 cc: 0.5
//aa: 0.0009 bb: 0.68 cc: 0.26
FSize = 0.0009*FSize*FSize + 0.68*FSize + 0.26;
//FSize = 0.001*FSize*FSize + 0.723*FSize - 1.318;
//FSize = 0.0006*FSize*FSize + 0.743*FSize - 1.53;
tPrp.FontSize = FSize;
}
......@@ -8061,7 +8067,7 @@ function TEST_COEFF_ITERATORS()
//FSize = 0.0006*FSize*FSize + 0.743*FSize - 1.53;
var x1 = 36, x2 = 14, x3 = 72;
var d1 = 26, d2 = 10, d3 = 55;
var d1 = 26, d2 = 10, d3 = 54;
// || x1*x1 x1 1 ||
// || x2*x2 x2 1 ||
......
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