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

integral

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48086 954022d7-b5bf-4e40-9824-e11837661b57
parent 63fa1fe9
......@@ -91,6 +91,13 @@ CMathBase.prototype =
setComposition: function(Compos)
{
this.Composition = Compos;
for(var i=0; i < this.nRow; i++)
for(var j = 0; j < this.nCol; j++)
{
if(!this.elements[i][j].IsJustDraw())
this.elements[i][j].setComposition(Compos);
}
},
setTxtPr: function(prp)
{
......@@ -100,6 +107,7 @@ CMathBase.prototype =
{
for(var i=0; i < this.nRow; i++)
for(var j = 0; j < this.nCol; j++)
if(!this.elements[i][j].IsJustDraw())
this.elements[i][j].fillPlaceholders();
},
setReduct: function(coeff)
......@@ -702,7 +710,7 @@ CMathBase.prototype =
setPosition: function(pos)
{
if(this.bMObjs === true)
this.pos = pos;
this.pos = {x: pos.x, y : pos.y};
else
this.pos = {x: pos.x, y: pos.y - this.size.center}; ///!!!!!!!!!!!!!!!!!!!!!!!!!!
......@@ -740,6 +748,8 @@ CMathBase.prototype =
var maxWH = this.getWidthsHeights();
this.setDistance();
var Widths = maxWH.widths;
var Heights = maxWH.heights;
......
......@@ -7,12 +7,9 @@ extend(CBarFraction, CMathBase);
CBarFraction.prototype.init = function()
{
var num = new CNumerator();
num.setComposition(this.Composition);
num.init();
var den = new CDenominator();
den.setComposition(this.Composition);
den.init();
this.setDimension(2, 1);
......
......@@ -202,6 +202,9 @@ CMathContent.prototype =
case 7:
mathElem = new CDegreeRadical();
break;
case 8:
mathElem = new CNary();
break;
}
if( mathElem !== null )
......@@ -430,7 +433,26 @@ CMathContent.prototype =
iter2.addTxt("2");
break;
case 23:
var integr = this.createMComponent(8);
integr.init(0,0,0);
integr.fillPlaceholders();
break;
case 25:
var integr = this.createMComponent(8);
integr.init(0,0,3);
integr.fillPlaceholders();
break;
/*case 24:
var integr = this.createMComponent(8);
integr.init(0,0,1);
integr.fillPlaceholders();
break;
case 26:
var integr = this.createMComponent(8);
integr.init(0,0,2);
integr.fillPlaceholders();
break;*/
}
},
removeAreaSelect: function()
......
This diff is collapsed.
function CSubMathBase(countRow, countCol)
function CSubMathBase()
{
CMathBase.call(this, countRow, countCol );
CMathBase.call(this);
}
extend(CSubMathBase, CMathBase);
CSubMathBase.prototype.mouseMove = function( mCoord )
{
var elem = this.findDisposition( mCoord);
var state = true,
SelectContent = null;
if(elem.pos.x == this.CurPos_X && elem.pos.y == this.CurPos_Y && elem.inside_flag === -1 )
{
movement = this.elements[this.CurPos_X][this.CurPos_Y].mouseMove(elem.mCoord);
SelectContent = movement.SelectContent;
state = movement.state;
}
else
{
state = false;
}
return {state: state, SelectContent: SelectContent};
}
/*CSubMathBase.prototype.remove = function()
function old_CSubMathBase(countRow, countCol)
{
var result = this.elements[this.CurPos_X][this.CurPos_Y].remove();
CMathBase.call(this, countRow, countCol );
}
extend(old_CSubMathBase, CMathBase);
this.recalculateSize();
/*old_CSubMathBase.prototype.remove = function()
{
var result = this.elements[this.CurPos_X][this.CurPos_Y].remove();
return result;
}*/
this.recalculateSize();
return result;
}*/
//выставим позиции каждого элемента, для того, чтобы не вычесть лишний раз "центр" объекта
/*CSubMathBase.prototype.setPosition = function(pos)
{
this.pos = pos;
var w = 0;
var h = 0;
var maxWH = this.getWidthsHeights();
for(var i=0; i < this.nRow; i++)
{
w = 0;
for(var j = 0 ; j < this.nCol; j++)
{
this.elements[i][j].setPosition( {x: this.pos.x + this.dW*j + w , y: this.pos.y + this.dH*i + h } );
w += maxWH.widths[j];
}
h += maxWH.heights[i];
}
}*/
CSubMathBase.prototype.old_mouseMove = function( mCoord )
/*old_CSubMathBase.prototype.setPosition = function(pos)
{
this.pos = pos;
var w = 0;
var h = 0;
var maxWH = this.getWidthsHeights();
for(var i=0; i < this.nRow; i++)
{
w = 0;
for(var j = 0 ; j < this.nCol; j++)
{
this.elements[i][j].setPosition( {x: this.pos.x + this.dW*j + w , y: this.pos.y + this.dH*i + h } );
w += maxWH.widths[j];
}
h += maxWH.heights[i];
}
}*/
old_CSubMathBase.prototype.old_mouseMove = function( mCoord )
{
var res = true;
var elem = this.findDisposition( mCoord);
......@@ -43,7 +69,7 @@ CSubMathBase.prototype.old_mouseMove = function( mCoord )
return res;
}
CSubMathBase.prototype.mouseMove = function( mCoord )
old_CSubMathBase.prototype.mouseMove = function( mCoord )
{
var elem = this.findDisposition( mCoord);
var state = true,
......
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