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

добавила готовую формулу для n-арных операторов

исправила баги для дроби (после внесенных изменений)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48332 954022d7-b5bf-4e40-9824-e11837661b57
parent 895896e4
......@@ -810,7 +810,7 @@ function Create_Structures()
dim =
{
sizeContainer: {column: 4, row : 1 },
countEqt: 2,
countEqt: 3,
widthEqt: 80,
heightEqt: 104
......@@ -827,7 +827,7 @@ function Create_Structures()
};
path = "url('Math/img/nary_2.png')";
Set_Container(dim, path, 81);
Set_Container(dim, path, 82);
/*dim =
{
......@@ -999,7 +999,7 @@ function Create_Structures()
};
var path = "url('Math/img/bracket.png')";
Set_Container(dim, path, 83);
Set_Container(dim, path, 84);
dim =
{
......@@ -1010,7 +1010,7 @@ function Create_Structures()
};
path = "url('Math/img/bracket_1.png')";
Set_Container(dim, path, 117);
Set_Container(dim, path, 118);
dim =
{
......@@ -1021,7 +1021,7 @@ function Create_Structures()
};
path = "url('Math/img/bracket_2.png')";
Set_Container(dim, path, 121);
Set_Container(dim, path, 122);
dim =
{
......@@ -1032,7 +1032,7 @@ function Create_Structures()
};
path = "url('Math/img/bracket_3.png')";
Set_Container(dim, path, 122);
Set_Container(dim, path, 123);
}
......@@ -1070,7 +1070,7 @@ function Create_Structures()
};
var path = "url('Math/img/trig_function.png')";
Set_Container(dim, path, 124);
Set_Container(dim, path, 125);
dim =
{
......@@ -1081,7 +1081,7 @@ function Create_Structures()
};
path = "url('Math/img/trig_function_1.png')";
Set_Container(dim, path, 150);
Set_Container(dim, path, 151);
}
var Accent = document.createElement("div");
......@@ -1117,7 +1117,7 @@ function Create_Structures()
};
var path = "url('Math/img/accent.png')";
Set_Container(dim, path, 151);
Set_Container(dim, path, 152);
dim =
{
......@@ -1127,7 +1127,7 @@ function Create_Structures()
heightEqt: 80
}
path = "url('Math/img/accent_1.png')";
Set_Container(dim, path, 171);
Set_Container(dim, path, 172);
dim =
{
......@@ -1137,7 +1137,7 @@ function Create_Structures()
heightEqt: 80
}
path = "url('Math/img/accent_2.png')";
Set_Container(dim, path, 173);
Set_Container(dim, path, 174);
dim =
{
......@@ -1147,7 +1147,7 @@ function Create_Structures()
heightEqt: 80
}
path = "url('Math/img/accent_3.png')";
Set_Container(dim, path, 174);
Set_Container(dim, path, 175);
dim =
{
......@@ -1167,7 +1167,7 @@ function Create_Structures()
heightEqt: 80
}
path = "url('Math/img/accent_4.png')";
Set_Container(dim, path, 175);
Set_Container(dim, path, 176);
dim =
{
......@@ -1177,7 +1177,7 @@ function Create_Structures()
heightEqt: 80
}
path = "url('Math/img/accent_5.png')";
Set_Container(dim, path, 176);
Set_Container(dim, path, 177);
}
......@@ -1215,7 +1215,7 @@ function Create_Structures()
};
var path = "url('Math/img/logarithm.png')";
Set_Container(dim, path, 177);
Set_Container(dim, path, 178);
dim =
{
......@@ -1226,7 +1226,7 @@ function Create_Structures()
};
path = "url('Math/img/logarithm_1.png')";
Set_Container(dim, path, 183);
Set_Container(dim, path, 184);
dim =
{
......@@ -1237,7 +1237,7 @@ function Create_Structures()
};
path = "url('Math/img/logarithm_2.png')";
Set_Container(dim, path, 184);
Set_Container(dim, path, 185);
}
var Operator = document.createElement("div");
......@@ -1273,7 +1273,7 @@ function Create_Structures()
};
var path = "url('Math/img/operators.png')";
Set_Container(dim, path, 185);
Set_Container(dim, path, 186);
dim =
{
......@@ -1284,7 +1284,7 @@ function Create_Structures()
};
path = "url('Math/img/operators_1.png')";
Set_Container(dim, path, 192);
Set_Container(dim, path, 193);
dim =
{
......@@ -1295,7 +1295,7 @@ function Create_Structures()
};
path = "url('Math/img/operators_2.png')";
Set_Container(dim, path, 204);
Set_Container(dim, path, 205);
dim =
{
......@@ -1306,7 +1306,7 @@ function Create_Structures()
};
path = "url('Math/img/operators_3.png')";
Set_Container(dim, path, 205);
Set_Container(dim, path, 206);
}
......@@ -1343,7 +1343,7 @@ function Create_Structures()
};
var path = "url('Math/img/matrix.png')";
Set_Container(dim, path, 206);
Set_Container(dim, path, 207);
dim =
{
......@@ -1354,7 +1354,7 @@ function Create_Structures()
};
path = "url('Math/img/matrix_1.png')";
Set_Container(dim, path, 226);
Set_Container(dim, path, 227);
}
MathDesign.bStruct = false;
......
......@@ -14,7 +14,6 @@ CBarFraction.prototype.init = function()
this.setDimension(2, 1);
this.addMCToContent(num, den);
}
CBarFraction.prototype.getCenter = function()
{
......@@ -29,14 +28,13 @@ CBarFraction.prototype.draw = function()
x2 = this.pos.x + this.size.width,
y1 = y2 = this.pos.y + this.size.center - penW/2;
if( ! this.bHide)
if(!this.bHide)
{
MathControl.pGraph.p_color(0,0,0, 255);
MathControl.pGraph.b_color1(0,0,0, 255);
MathControl.pGraph.drawHorLine(0, y1, x1, x2, penW);
}
CBarFraction.superclass.draw.call(this);
}
CBarFraction.prototype.getNumerator = function()
......@@ -75,11 +73,15 @@ CNumerator.prototype.recalculateSize = function()
var arg = this.elements[0][0].size;
var txtPrp = this.getTxtPrp();
/*var font = GetMathFont(txtPrp);
var plH = font.metrics.Placeholder.Height/2;*/
var Descent = arg.height - arg.ascent; // baseLine
var gap = 7.832769097222222 * txtPrp.FontSize/36,
minGap = txtPrp.FontSize* 25.4/96 * 0.16;
var delta = 0.65*gap - Descent;
// var delta = 0.65*gap - Descent;
var delta = 0.8076354679802956*gap - Descent;
var GapNum = delta > minGap ? delta - 0.95*minGap: minGap;
......@@ -180,7 +182,7 @@ CDenominator.prototype.recalculateSize = function()
var txtPrp = this.getTxtPrp();
var gap = 7.832769097222222 * txtPrp.FontSize/36,
Ascent = arg.ascent,
Ascent = arg.center - 4.938888888888888*txtPrp.FontSize/36,
minGap = txtPrp.FontSize* 25.4/96 * 0.24;
var delta = 0.47*gap - Ascent;
......
Word/Math/img/nary_1.PNG

1.92 KB | W: | H:

Word/Math/img/nary_1.PNG

2.32 KB | W: | H:

Word/Math/img/nary_1.PNG
Word/Math/img/nary_1.PNG
Word/Math/img/nary_1.PNG
Word/Math/img/nary_1.PNG
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -149,7 +149,6 @@ CMathText.prototype =
{
this.bIterator = bIterator; // символы другие , чуть толще
},
// ascent = Symbol.Ascent // = Placeholder.Ascent (= Placeholder.Height)
// descent = FontAscent - Placeholder.Height (FontAscent = FontHeight - FontDescent)
......@@ -174,7 +173,13 @@ CMathText.prototype =
var _height = _ascent + _descent;
var widthG = metricsTxt.WidthG;
var _center = _ascent - 0.2798833819241982*g_oTextMeasurer.GetHeight(); // смещаем центр
var _center = _ascent - 0.2487852283770651*g_oTextMeasurer.GetHeight(); // смещаем центр
//var _center = _ascent - 0.2798833819241982*g_oTextMeasurer.GetHeight(); // смещаем центр
/*var font = GetMathFont(txtPrp);
var placeholder = font.metrics.Placeholder;
var _cent = placeholder.Height*0.375;
var HH = g_oTextMeasurer.GetHeight();*/
this.size = {width: _width, widthG: widthG, height: _height, center: _center, ascent: _ascent, descent: _descent};
},
......
......@@ -98,7 +98,7 @@ CNary.prototype.init = function(index, orderType, iterType)
}
CNary.prototype.setDistance = function()
{
this.dW = this.Parent.getTxtPrp().FontSize/36*2.45;
this.dW = this.getTxtPrp().FontSize/36*2.45;
}
CNary.prototype.getBase = function()
{
......
......@@ -2179,7 +2179,6 @@ CSingleArrow.prototype.calcCoord = function(measure)
H = YY[6];
return {XX: XX, YY: YY, W: W, H: H};
}
CSingleArrow.prototype.drawPath = function(XX, YY)
{
......@@ -2874,7 +2873,7 @@ CSeparator.prototype.draw = function()
MathControl.pGraph.p_width(1000);
MathControl.pGraph.b_color1(0,0,0, 255);
pW = this.Parent.getTxtPrp().FontSize/18*g_dKoef_pt_to_mm;
pW = this.getTxtPrp().FontSize/18*g_dKoef_pt_to_mm;
for(var i = 0; i < this.nCol - 1; i++)
{
......
......@@ -282,7 +282,7 @@ CDegreeRadical.prototype.recalculateSize = function()
var width = degr.width - wTick + sign.width;
var txtPrp = this.Parent.getTxtPrp();
var txtPrp = this.getTxtPrp();
var plH = 9.877777777777776 * txtPrp.FontSize /36;
if( sign.height < plH )
......
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