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

Удаление/добавление строк в EqArray

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68206 954022d7-b5bf-4e40-9824-e11837661b57
parent 449d1400
......@@ -4843,6 +4843,7 @@ CMathContent.prototype.Delete_ItemToContentThroughInterface = function(Props, Po
RemoveScript = Props.Type == c_oAscMathInterfaceType.Script && Props.ScriptType == c_oAscMathInterfaceScript.None && (Item.kind == MATH_DEGREESubSup || Item.kind == MATH_DEGREE),
RemoveLimit = Props.Type == c_oAscMathInterfaceType.Limit && Props.Pos == c_oAscMathInterfaceLimitPos.None && Item.kind === MATH_LIMIT,
RemoveMatrix = Props.Type == c_oAscMathInterfaceType.Matrix && this.Content[Pos].Is_DeletedItem(Props.Action),
RemoveEqArray = Props.Type == c_oAscMathInterfaceType.EqArray && this.Content[Pos].Is_DeletedItem(Props.Action),
//RemovePreSubSup = Props.Action & c_oMathMenuAction.RemoveScript && Item.kind == MATH_DEGREESubSup && Item.Pr.type == DEGREE_PreSubSup,
//RemoveDegree = Props.Action & c_oMathMenuAction.RemoveScript && Item.kind == MATH_DEGREE,
//RemoveLimit = Props.Action & c_oMathMenuAction.RemoveLimit && Item.kind == MATH_LIMIT,
......@@ -4853,7 +4854,7 @@ CMathContent.prototype.Delete_ItemToContentThroughInterface = function(Props, Po
RemoveBox = Props.Action & c_oMathMenuAction.RemoveBox && Item.kind == MATH_BOX;
if(RemoveChar || RemoveBar || RemoveScript || RemoveLimit || RemoveMatrix || RemoveDelimiter || RemoveGroupChar || RemoveRadical || RemoveBox)
if(RemoveChar || RemoveBar || RemoveScript || RemoveLimit || RemoveMatrix || RemoveEqArray || RemoveDelimiter || RemoveGroupChar || RemoveRadical || RemoveBox)
{
var Items = this.Content[Pos].Get_DeletedItemsThroughInterface();
......
......@@ -1730,6 +1730,23 @@ CEqArray.prototype.Apply_MenuProps = function(Props)
}
}
}
if(Props.Action & c_oMathMenuAction.DeleteEquation && this.getRowsCount() > 1)
{
this.Remove_Row(this.CurPos);
}
if(Props.Action & c_oMathMenuAction.InsertEquation)
{
if(Props.Action & c_oMathMenuAction.InsertBefore)
{
this.Add_Row(this.CurPos);
}
else
{
this.Add_Row(this.CurPos + 1);
}
}
}
};
......@@ -1809,9 +1826,9 @@ CEqArray.prototype.Is_SimpleDelete = function()
{
return false;
};
CEqArray.prototype.Is_DeletedItem = function(Type)
CEqArray.prototype.Is_DeletedItem = function(Action)
{
return c_oAscMathMenuTypes.EqArrayRemoveRow == Type && 1 == this.getRowsCount();
return Action & c_oMathMenuAction.DeleteEquation && 1 == this.getRowsCount();
};
CEqArray.prototype.Get_DeletedItemsThroughInterface = function()
{
......
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