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

1. Gaps для объектов (коэффициенты)

2. Добавила Remove на AddComposition
3. Поправила, в случае удаления, когда мат. объект становится первым/последним в контенте выставлялись "нулевые gaps"

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53902 954022d7-b5bf-4e40-9824-e11837661b57
parent 9c8b48a1
......@@ -1139,5 +1139,19 @@ CMathBase.prototype =
content = this.elements[this.CurPos_X][this.CurPos_Y].goToRightSelect(bParent);
return content;
},
getGapsInside: function()
{
var kind = this.kind;
var gaps = {left: 0, right: 0};
var checkBase = kind == MATH_DEGREE || kind == MATH_DEGREESubSup || kind == MATH_ACCENT || kind == MATH_RADICAL|| kind == MATH_BOX || kind == MATH_BORDER_BOX;
if(checkBase)
{
var base = this.getBase();
gaps = base.getGapsInside();
}
return gaps;
}
}
......@@ -327,7 +327,7 @@ CIterators.prototype.setDistanceIters = function(oMeasure)
var shCenter = this.Composition.GetShiftCenter(oMeasure, mgCtrPrp);
var upDesc = upIter.height - upIter.ascent + shCenter,
lowAsc = lowIter.ascent - shCenter;
lowAsc = 1.2*(lowIter.ascent - shCenter);
var up = 0;
var down = 0;
......@@ -346,7 +346,7 @@ CIterators.prototype.setDistanceIters = function(oMeasure)
if( this.lD > lowAsc )
down = this.lD - lowAsc;
var minGap = 1.2*shCenter;
var minGap = 1.1*shCenter;
if( up + down < minGap)
{
......@@ -447,7 +447,8 @@ CDegreeSubSup.prototype.recalculateSize = function(oMeasure)
//var ctrPrp = this.getCtrPrp();
var mgCtrPrp = this.mergeCtrTPrp();
var shCenter = this.Composition.GetShiftCenter(oMeasure, mgCtrPrp) /0.6;
var shCenter = this.Composition.GetShiftCenter(oMeasure, mgCtrPrp);
shCenter *= 1.2;
var width = 0, height = 0,
ascent = 0;
......@@ -476,7 +477,7 @@ CDegreeSubSup.prototype.recalculateSize = function(oMeasure)
iters.setDistanceIters(oMeasure);
iters.recalculateSize();
this.dW = 0.2*shCenter;
this.dW = 0.18*shCenter;
width = iters.size.width + base.size.width + this.dW;
//height = shCenter + iters.lUp;
......
This diff is collapsed.
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