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

Bug 25089 - Появляется лишняя диаграмма в группе, при изменений параметра "display units"

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57020 954022d7-b5bf-4e40-9824-e11837661b57
parent 4b42d4e8
......@@ -5458,24 +5458,35 @@ function DrawingObjects() {
_this.getGraphicSelectionType = function(id) {
for ( var i = 0; i < aObjects.length; i++ ) {
var obj = aObjects[i];
if ( obj.graphicObject.Id == id ) {
if ( obj.isChart() ) {
if ( _this.controller.selection.chartSelection && _this.controller.selection.chartSelection.textSelection)
return c_oAscSelectionType.RangeChartText;
return c_oAscSelectionType.RangeChart;
}
var selected_objects, selection, controller = _this.controller;
if(controller.selection.groupSelection)
{
selected_objects = controller.selection.groupSelection.selectedObjects;
selection = controller.selection.groupSelection.selection;
}
else
{
selected_objects = controller.selectedObjects;
selection = controller.selection;
}
if(selection.chartSelection && selection.chartSelection.selection.textSelection)
{
return c_oAscSelectionType.RangeChartText;
}
if(selection.textSelection)
{
return c_oAscSelectionType.RangeShapeText;
}
if(selected_objects[0] )
{
if(selected_objects[0].getObjectType() === historyitem_type_ChartSpace)
return c_oAscSelectionType.RangeChart;
if ( obj.graphicObject.isImage() )
return c_oAscSelectionType.RangeImage;
if(selected_objects[0].getObjectType() === historyitem_type_Shape)
return c_oAscSelectionType.RangeShape;
if ( obj.graphicObject.isShape() || obj.graphicObject.isGroup() ) {
if ( _this.controller.selection.textSelection )
return c_oAscSelectionType.RangeShapeText;
return c_oAscSelectionType.RangeShape;
}
}
if(selected_objects[0].getObjectType() === historyitem_type_ImageShape)
return c_oAscSelectionType.RangeImage;
}
return undefined;
};
......
......@@ -1586,15 +1586,11 @@ DrawingObjectsController.prototype =
this.chartForProps = null;
}
if(this.selectedObjects.length === 1
&& (this.selectedObjects[0].isChart()
|| (isRealObject(this.curState.group) && this.curState.group.selectedObjects.length === 1 && this.curState.group.selectedObjects[0].isChart())))
var objects_by_types = this.getSelectedObjectsByTypes();
if(objects_by_types.charts.length === 1)
{
this.checkSelectedObjectsAndCallback(this.editChartCallback, [chart]);
}
},
applyDrawingProps: function(props)
......
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