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

Поправила перемещение по стрелкам с зажатым shift : не возвращались обратно...

Поправила перемещение по стрелкам с зажатым shift : не возвращались обратно внутрь контента при перемещнии, если он не был первым (для стрелки вправо) или последним (для стрелки влево) в мат объекте

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56965 954022d7-b5bf-4e40-9824-e11837661b57
parent 27142cb7
"use strict";
var CENTER = -1;
function CMathBase()
{
this.typeObj = MATH_COMP;
......@@ -1514,14 +1513,17 @@ CMathBase.prototype =
CurPos_X = ContentPos.Get(Depth);
CurPos_Y = ContentPos.Get(Depth + 1);
}
else if(SearchPos.ForSelection == true && this.SelectEnd.bOutside === true)
{
CurPos_X = this.SelectEnd.X;
CurPos_Y = this.SelectEnd.Y;
}
else
{
CurPos_X = this.nRow - 1;
CurPos_Y = this.nCol - 1;
}
//var bUseContent = UseContentPos;
while(CurPos_X >= 0)
{
while(CurPos_Y >= 0)
......@@ -1568,24 +1570,27 @@ CMathBase.prototype =
CurPos_X = ContentPos.Get(Depth);
CurPos_Y = ContentPos.Get(Depth + 1);
}
else if(SearchPos.ForSelection == true && this.SelectEnd.bOutside === true)
{
CurPos_X = this.SelectEnd.X;
CurPos_Y = this.SelectEnd.Y;
}
else
{
CurPos_X = 0;
CurPos_Y = 0;
}
var bUseContent = UseContentPos;
while(CurPos_X < this.nRow)
{
while(CurPos_Y < this.nCol)
{
var bJDraw = this.elements[CurPos_X][CurPos_Y].IsJustDraw(),
usePlh = !bJDraw && bUseContent && this.elements[CurPos_X][CurPos_Y].IsPlaceholder();
usePlh = !bJDraw && UseContentPos && this.elements[CurPos_X][CurPos_Y].IsPlaceholder();
if(!bJDraw && !usePlh)
{
this.elements[CurPos_X][CurPos_Y].Get_RightPos(SearchPos, ContentPos, Depth + 2, bUseContent, StepEnd, BegRun);
this.elements[CurPos_X][CurPos_Y].Get_RightPos(SearchPos, ContentPos, Depth + 2, UseContentPos, StepEnd, BegRun);
SearchPos.Pos.Update(CurPos_X, Depth);
SearchPos.Pos.Update(CurPos_Y, Depth+1);
}
......@@ -1595,7 +1600,7 @@ CMathBase.prototype =
CurPos_Y++;
bUseContent = false;
UseContentPos = false;
BegRun = true;
}
......@@ -1609,8 +1614,10 @@ CMathBase.prototype =
result = SearchPos.Found;
return result;
var str = "Start: Outside " + this.SelectStart.bOutside + ", X " + this.SelectStart.X + ", Y " + this.SelectStart.Y + " ; " + "End: Outside " + this.SelectEnd.bOutside + ", X " + this.SelectEnd.X + ", Y " + this.SelectEnd.Y;
console.log(str);
return result;
},
old_Get_WordStartPos : function(SearchPos, ContentPos, Depth, UseContentPos)
{
......
......@@ -6444,7 +6444,6 @@ CMathContent.prototype =
var result = false;
var CurPos = UseContentPos ? ContentPos.Get(Depth) : 0;
var bUseContent = UseContentPos;
while(CurPos < this.content.length && SearchPos.Found == false)
{
......@@ -6461,10 +6460,8 @@ CMathContent.prototype =
var bNotshift = SearchPos.ForSelection == false,
bShiftCurrObj = SearchPos.ForSelection == true && this.SelectStartPos == CurPos;
//console.log("Get_RightPos : CurPos " + CurPos + " SelectStartPos " + this.SelectStartPos);
if( bNotshift || bShiftCurrObj )
this.content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, bUseContent, StepEnd, BegRun);
this.content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, UseContentPos, StepEnd, BegRun);
}
else if(BegRun)
{
......@@ -6473,7 +6470,7 @@ CMathContent.prototype =
}
else
{
this.content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, bUseContent, StepEnd);
this.content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, UseContentPos, StepEnd);
}
SearchPos.Pos.Update(CurPos, Depth);
......@@ -6485,7 +6482,7 @@ CMathContent.prototype =
BegRun = true;
CurPos++;
bUseContent = false;
UseContentPos = false;
}
......
......@@ -25,7 +25,7 @@ function CMathMatrix(props)
rSp: 0,
rSpRule: 0,
mcs: new Array(),
mcs: new Array(),
baseJc: BASEJC_CENTER,
plcHide: false
};
......@@ -42,7 +42,6 @@ function CMathMatrix(props)
if(props !== null && typeof(props) !== "undefined")
this.init(props);
//this.constructor.superclass.init.call(this, props);
g_oTableId.Add( this, this.Id );
}
......
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