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

Добавление/удаление аргумента у delimiters

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68198 954022d7-b5bf-4e40-9824-e11837661b57
parent adf983c2
......@@ -3056,7 +3056,6 @@ function CMathMenuBase(oMath)
this.CanInsertManualBreak = false;
this.CanDeleteManualBreak = false;
this.CanAlignToCharacter = false;
}
else
{
......
......@@ -3787,6 +3787,8 @@ CDelimiter.prototype.getElementMathContent = function(Index)
};
CDelimiter.prototype.Apply_MenuProps = function(Props)
{
var NewContent;
if(Props.Type == c_oAscMathInterfaceType.Delimiter)
{
if(Props.HideBegOper !== undefined && Props.HideBegOper !== this.begOper.Is_Empty())
......@@ -3821,6 +3823,39 @@ CDelimiter.prototype.Apply_MenuProps = function(Props)
this.raw_SetShape(Shp);
}
}
if(Props.Action & c_oMathMenuAction.DeleteDelimiterArgument)
{
if(this.Pr.column > 1)
{
History.Add(this, new CChangesMathBaseSetColumn(this.Pr.column - 1, this.Pr.column));
this.raw_SetColumn(this.Pr.column - 1);
this.protected_RemoveItems(this.CurPos, [ this.Content[this.CurPos] ], true);
}
}
if(Props.Action & c_oMathMenuAction.InsertDelimiterArgument)
{
if(Props.Action & c_oMathMenuAction.InsertBefore)
{
History.Add(this, new CChangesMathBaseSetColumn(this.Pr.column + 1, this.Pr.column));
this.raw_SetColumn(this.Pr.column + 1);
NewContent = new CMathContent();
NewContent.Correct_Content(true);
this.protected_AddToContent(this.CurPos, [NewContent], true);
}
else
{
History.Add(this, new CChangesMathBaseSetColumn(this.Pr.column + 1, this.Pr.column));
this.raw_SetColumn(this.Pr.column + 1);
NewContent = new CMathContent();
NewContent.Correct_Content(true);
this.protected_AddToContent(this.CurPos + 1, [NewContent], true);
}
}
}
};
CDelimiter.prototype.old_Apply_MenuProps = function(Type)
......
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