Commit c9a8ea34 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

правка бага 22171 - Кнопки смены плана для автофигур перестают работать

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52110 954022d7-b5bf-4e40-9824-e11837661b57
parent 10998e15
......@@ -2124,7 +2124,7 @@ DrawingObjectsController.prototype =
}
for(var i = sp_tree.length-1; i > -1 ; --i)
{
if(sp_tree[i].selected)
if(sp_tree[i].graphicObject.selected)
{
sp_tree[i].graphicObject.deleteDrawingBase();
}
......
......@@ -121,6 +121,7 @@ function CMouseEventHandler()
this.fromJQueryEvent = function(e)
{
this.ClickCount = isRealNumber(e.ClickCount) && e.ClickCount === 2 ? 2 : 1;
this.Button = e.which - 1;
this.Type = g_o_event_map[e.type];
this.ShiftKey = e.shiftKey;
this.IsLocked = true;
......@@ -1986,6 +1987,11 @@ CShape.prototype =
t_y = this.invertTransformText.TransformPointY(x, y);
var event = new CMouseEventHandler();
event.fromJQueryEvent(e);
if(event.Button === g_mouse_button_right)
{
if(this.txBody.content.Selection_Check(t_x, t_y, 0))
return;
}
this.txBody.selectionSetStart(event, t_x, t_y);
this.txBody.content.RecalculateCurPos();
},
......
......@@ -1790,6 +1790,14 @@ function TextAddState(drawingObjectsController, drawingObjects, textObject)
this.onMouseUp = function(e, x, y)
{
if(e.button === 2)
{
var invert_text_transform = this.textObject.invertTransformText;
var tx = invert_text_transform.TransformPointX(x, y);
var ty = invert_text_transform.TransformPointY(x, y);
if(this.textObject.txBody.content.Selection_Check(tx, ty, 0))
return;
}
this.textObject.selectionSetEnd(e, x, y);
this.textObject.updateSelectionState(this.drawingObjects.drawingDocument);
};
......
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