Commit 6f8b242a authored by Anna.Pavlova's avatar Anna.Pavlova

поправила селект

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55394 954022d7-b5bf-4e40-9824-e11837661b57
parent d831d439
......@@ -1362,11 +1362,6 @@ CMathBase.prototype =
}
},
/*Selection_DrawRange: function(SelectionDraw)
{
if(this.IsSelectEmpty())
this.elements[this.SelectStart_X][this.SelectStart_Y].Selection_DrawRange(SelectionDraw);
},*/
Selection_IsEmpty: function()
{
var result = false;
......
......@@ -7636,82 +7636,6 @@ CMathContent.prototype =
return result;
},
//Selection_DrawRange: function(CurLine, CurPage, SelectionDraw)
OLD_Selection_DrawRange: function(SelectionDraw)
{
if(this.SelectStartPos !== this.SelectEndPos)
{
var startPos = this.SelectStartPos,
endPos = this.SelectEndPos;
if(startPos > endPos)
{
var temp = startPos;
startPos = endPos;
endPos = temp;
}
if(this.content[startPos].typeObj === MATH_PARA_RUN)
{
SelectionDraw.StartX += this.pos.x + this.WidthToElement[startPos];
this.content[startPos].Selection_DrawRange(0, 0, SelectionDraw);
SelectionDraw.StartY = this.pos.y + this.Composition.absPos.y;
}
else
{
SelectionDraw.W += this.content[startPos].size.width;
SelectionDraw.StartX = this.pos.x + this.Composition.absPos.x + this.WidthToElement[startPos];
SelectionDraw.StartY = this.pos.y + this.Composition.absPos.y;
}
SelectionDraw.W += this.WidthToElement[endPos] - this.WidthToElement[startPos + 1]; // startPos < endPos
SelectionDraw.FindStart = false;
if(this.content[endPos].typeObj === MATH_PARA_RUN)
{
this.content[endPos].Selection_DrawRange(0, 0, SelectionDraw);
}
else
SelectionDraw.W += this.content[endPos].size.width;
SelectionDraw.H = this.size.height;
SelectionDraw.FindStart = false;
}
else
{
var pos = this.SelectStartPos;
if(this.content[pos].typeObj === MATH_COMP)
{
if(this.content[pos].IsSelectEmpty())
{
this.content[pos].Selection_DrawRange(SelectionDraw);
}
else
{
SelectionDraw.FindStart = false;
SelectionDraw.W = this.content[pos].size.width;
SelectionDraw.H = this.size.height;
SelectionDraw.StartX = this.pos.x + this.Composition.absPos.x + this.WidthToElement[pos];
SelectionDraw.StartY = this.pos.y + this.Composition.absPos.y;
}
}
else if(this.content[pos].typeObj === MATH_PARA_RUN)
{
SelectionDraw.StartX += this.pos.x + this.WidthToElement[pos];
this.content[pos].Selection_DrawRange(0, 0, SelectionDraw);
SelectionDraw.H = this.size.height;
SelectionDraw.StartY = this.pos.y + this.Composition.absPos.y;
}
}
},
Select_All: function()
{
this.SelectStartPos = 0;
......
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