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

Bug 24616 - Не открывается меню диаграмм при двойном клике по ней

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56759 954022d7-b5bf-4e40-9824-e11837661b57
parent 37f01fec
......@@ -352,12 +352,19 @@ DrawingObjectsController.prototype =
{
this.changeCurrentState(new PreMoveInlineObject(this, object, is_selected, true));
}
}
else
{
group.resetInternalSelection();
this.changeCurrentState(new PreMoveInGroupState(this, group, x, y, e.ShiftKey, e.CtrlKey, object, is_selected));
}
if(e.ClickCount > 1 && !e.ShiftKey && !e.CtrlKey && ((this.selection.groupSelection && this.selection.groupSelection.selectedObjects.length === 1) || this.selectedObjects.length === 1)
&& object.getObjectType() === historyitem_type_ChartSpace && !bInSelect && this.handleChartDoubleClick)
{
var drawing = this.selectedObjects[0].parent;
this.handleChartDoubleClick(drawing, object);
}
}
return true;
}
......
......@@ -333,6 +333,11 @@ function handleInlineHitNoText(drawing, drawingObjects, e, x, y, pageIndex)
drawingObjects.resetSelection();
drawing.select(drawingObjects, pageIndex);
drawingObjects.changeCurrentState(new PreMoveInlineObject(drawingObjects, drawing));
if(e.ClickCount > 1 && !e.ShiftKey && !e.CtrlKey && ((drawingObjects.selection.groupSelection && drawingObjects.selection.groupSelection.selectedObjects.length === 1) || drawingObjects.selectedObjects.length === 1)
&& drawing.getObjectType() === historyitem_type_ChartSpace && drawingObjects.handleChartDoubleClick)
{
drawingObjects.handleChartDoubleClick(drawing.parent, drawing);
}
drawingObjects.updateOverlay();
return true;
}
......
......@@ -531,10 +531,6 @@ CChartSpace.prototype =
return null;
},
checkBBoxIntersection: function(bbox1, bbox2)
{
return !(bbox1.r1 > bbox2.r2 || bbox2.r1 > bbox1.r2 || bbox1.c1 > bbox2.c2 || bbox2.c1 > bbox1.c2)
......
......@@ -927,6 +927,8 @@ function PreMoveInGroupState(drawingObjects, group, startX, startY, ShiftKey, Ct
this.CtrlKey = CtrlKey;
this.majorObject = majorObject;
this.majorObjectIsSelected = majorObjectIsSelected;
}
PreMoveInGroupState.prototype =
......
......@@ -961,6 +961,15 @@ CGraphicObjects.prototype =
getTargetDocContent: DrawingObjectsController.prototype.getTargetDocContent,
handleChartDoubleClick: function(drawing, chart)
{
if(false === this.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_Element_and_Type , Element : drawing, CheckType : changestype_Paragraph_Content} ))
{
editor.asc_fireCallback("asc_doubleClickOnChart", chart);
this.changeCurrentState(new NullState(this));
}
},
addInlineImage: function( W, H, Img, Chart, bFlow )
{
var content = this.getTargetDocContent();
......
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