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

1. bar object

2. поправила баг с линиями в качестве delimiters (были не равноудаленны)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50012 954022d7-b5bf-4e40-9824-e11837661b57
parent 511ba203
......@@ -260,4 +260,51 @@ CBox.prototype.init = function(props)
CBox.prototype.getBase = function()
{
return this.elements[0][0];
}
function CBar()
{
this.loc = LOCATION_BOT;
CCharacter.call(this);
}
extend(CBar, CCharacter);
CBar.prototype.init = function(props)
{
if(props.pos === "top" || props.location === LOCATION_TOP)
this.loc = LOCATION_TOP;
else if(props.pos === "bot" || props.location === LOCATION_BOT)
this.loc = LOCATION_BOT;
var glyph = new COperatorLine();
var props =
{
location: this.loc,
turn: TURN_0
};
glyph.init(props);
this.setOperator( new COperator(glyph) );
}
CBar.prototype.getCenter = function()
{
var center;
if(this.loc === LOCATION_TOP )
center = this.operator.size.height + this.elements[0][0].size.center;
else if(this.loc === LOCATION_BOT )
center = this.elements[0][0].size.center;
return center;
}
function CPhantom()
{
CMathBase.call(this);
}
extend(CPhantom, CMathBase);
CPhantom.prototype.init = function(props)
{
this.setDimension(1, 1);
this.setContent();
}
\ No newline at end of file
This diff is collapsed.
......@@ -11,7 +11,9 @@ var MATH_BORDER_BOX = 9;
var MATH_LIMIT = 10;
var MATH_MATRIX = 11;
var MATH_BOX = 12;
var MATH_EQ_ARRAY = 13;
var MATH_EQ_ARRAY = 13;
var MATH_BAR = 14;
var MATH_PHANTOM = 15;
var BAR_FRACTION = 0;
var SKEWED_FRACTION = 1;
......
......@@ -230,27 +230,27 @@ CGlyphOperator.prototype.getCoordinateGlyph = function()
// A*x + B*y + C = 0
if(this.loc == 0)
if(this.loc == LOCATION_TOP)
{
a1 = 1; b1 = 0; c1 = 0;
a2 = 0; b2 = 1; c2 = 0;
}
else if(this.loc == 1)
else if(this.loc == LOCATION_BOT)
{
a1 = 1; b1 = 0; c1 = 0;
a2 = 0; b2 = 1; c2 = H - glH;
}
else if(this.loc == 2)
else if(this.loc == LOCATION_LEFT)
{
a1 = 0; b1 = 1; c1 = 0;
a2 = 1; b2 = 0; c2 = 0;
}
else if(this.loc == 3)
else if(this.loc == LOCATION_RIGHT)
{
a1 = 0; b1 = 1; c1 = W - glW;
a2 = 1; b2 = 0; c2 = 0;
}
else if(this.loc == 4)
else if(this.loc == LOCATION_SEP)
{
a1 = 0; b1 = 1; c1 = 0;
a2 = 1; b2 = 0; c2 = 0;
......@@ -2661,7 +2661,7 @@ COperatorLine.prototype.calcCoord = function(measure)
var W = XX[2],
H = YY[2];
H = YY[2] + shY;
return {XX: XX, YY: YY, W: W, H: H};
......
......@@ -191,7 +191,7 @@
<!--<script type="text/javascript" src = "Math/parenthesis.js"></script>-->
<script type="text/javascript" src = "Math/operators.js"></script>
<script type="text/javascript" src = "Math/diacritical.js"></script>
<script type="text/javascript" src = "Math/accent.js"></script>
<script type="text/javascript" src = "Math/drawingUnion.js"></script>
<script type="text/javascript" src = "Math/borderBox.js"></script>
......
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