Commit 2e3cf493 authored by Anna.Pavlova's avatar Anna.Pavlova

1. Поправила gaps для нижнего итератора у N-арных операторов (теперь нижние...

1. Поправила gaps для нижнего итератора у N-арных операторов (теперь нижние итераторы выровнены по baseline)
2. Поправила баг при передвижении мышкой во вложенных объектаъх (таких как N-арные, DegreeSupSub неправильно выставлялся SelectContent)
3. Поправила баг : при составлении готовых формул для меню не учитывался argSize для объектов внутри этой формулы (например если добавляем степень, внутри итератора еще одна степень)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54331 954022d7-b5bf-4e40-9824-e11837661b57
parent 61eeb490
......@@ -7806,10 +7806,13 @@ ParaMath.prototype =
{
var ctrPrp = new CTextPr();
oElem.setCtrPrp(ctrPrp);
if (oParent)
oParent.addElementToContent(oElem);
oElem.init(props); // прокидываем свойства после добавления в формулу, т.к. дефолтные настройки(общие для всей формулы, к-ые передаются из settings) хранятся в Composition
oElem.setArgSize(oParent.argSize);
},
CreateFraction : function (oFraction,oParentElem,props,sNumText,sDenText)
......@@ -7975,6 +7978,10 @@ ParaMath.prototype =
{
this.Math.Cursor_MoveToEndPos();
},
/*Apply_TextPr: function(TextPr)
{
this.Math.Apply_TextPr(TextPr);
},*/
Copy : function()
{
......
......@@ -1043,7 +1043,8 @@ CMathBase.prototype =
this.CurPos_Y = startY;
var movement = this.elements[endX][endY].selection_End(X, Y);
SelectContent = movement.SelectContent;
state = true;
state = movement.state;
//state = true;
}
else
state = false;
......
......@@ -130,7 +130,8 @@ CDegree.prototype.recalculateSup = function(oMeasure)
if(bBaseOnlyText)
{
var UpBaseline = 1.786*shCenter; // baseline итератора
//var UpBaseline = 1.786*shCenter; // baseline итератора
var UpBaseline = 1.65*shCenter; // baseline итератора
// iter.height - UpBaseline - iter.ascent + base.ascent > 2/3 * base.height
......@@ -162,7 +163,6 @@ CDegree.prototype.recalculateSup = function(oMeasure)
this.size = {width: width, height: height, ascent: ascent};
}
CDegree.prototype.recalculateSubScript = function(oMeasure)
{
var base = this.elements[0][0].size,
......
......@@ -339,6 +339,8 @@ CMathContent.prototype =
if(check)
{
// складываем здесь, чтобы не потерять собственные настройки argSize: при добавлении в итератор формулы из меню; при добавлении готовых формул, когда есть вложенность формул с итераторами
// не будет работать при копиравнии в случае, если argSize будет отличатся от нуля для копируемой части контента
var val = this.argSize + argSize;
if(val < -2)
......@@ -6248,6 +6250,7 @@ CMathContent.prototype =
if( this.argSize > -2 )
this.argSize--;
},
old_old_checkRunPrp: function()
{
var bEmpty = this.IsEmpty(),
......@@ -8207,7 +8210,6 @@ function TEST_COEFF_ITERATORS()
// a*72*72 + b*72 + c = 55
//FSize = 0.0006*FSize*FSize + 0.743*FSize - 1.53;
......
......@@ -283,12 +283,32 @@ CNaryOvr.prototype.init = function(sign)
this.addMCToContent(sign, iter);
}
CNaryOvr.prototype.setDistance = function()
CNaryOvr.prototype.old_setDistance = function()
{
var zetta = this.getCtrPrp().FontSize* 25.4/96;
this.dH = zetta*0.1;
}
CNaryOvr.prototype.getAscent = function()
CNaryOvr.prototype.recalculateSize = function()
{
var FontSize = this.getCtrPrp().FontSize;
var zetta = FontSize*25.4/96;
var minGapBottom = zetta*0.1,
DownBaseline = FontSize*0.23;
var nOper = this.elements[0][0].size,
iter = this.elements[1][0].size;
this.dH = DownBaseline > iter.ascent + minGapBottom ? DownBaseline - iter.ascent : minGapBottom;
var ascent = nOper.ascent;
var width = nOper.width > iter.width ? nOper.width : iter.width;
var height = nOper.height + this.dH + iter.height;
this.size = {width: width, height: height, ascent: ascent};
}
CNaryOvr.prototype.old_getAscent = function()
{
return this.elements[0][0].size.ascent;
}
......@@ -318,9 +338,16 @@ CNaryUndOvr.prototype.init = function(sign)
}
CNaryUndOvr.prototype.recalculateSize = function()
{
var zetta = this.getCtrPrp().FontSize* 25.4/96;
var FontSize = this.getCtrPrp().FontSize;
var zetta = FontSize*25.4/96;
this.gapTop = zetta*0.25;
this.gapBottom = zetta*0.1;
//this.gapBottom = zetta*0.1;
var minGapBottom = zetta*0.1,
DownBaseline = FontSize*0.23;
var ascLIter = this.elements[2][0].size.ascent;
this.gapBottom = DownBaseline > ascLIter + minGapBottom ? DownBaseline - ascLIter : minGapBottom;
var ascent = this.elements[0][0].size.height + this.gapTop + this.elements[1][0].size.ascent;
......
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