Commit 497b5313 authored by Julia Radzhabova's avatar Julia Radzhabova

[SSE] Bug 34159.

parent 51b2f784
......@@ -695,12 +695,15 @@ define([
(new SSE.Views.ChartSettingsDlg(
{
chartSettings: props,
imageSettings: item.chartInfo,
isChart: true,
api: me.api,
handler: function(result, value) {
if (result == 'ok') {
if (me.api) {
me.api.asc_editChartDrawingObject(value.chartSettings);
if (value.imageSettings)
me.api.asc_setGraphicObjectProps(value.imageSettings);
}
}
Common.NotificationCenter.trigger('edit:complete', me);
......@@ -1205,6 +1208,7 @@ define([
isshapemenu = true;
}
} else if ( elValue.asc_getChartProperties() ) {
documentHolder.mnuChartEdit.chartInfo = elValue;
ischartmenu = true;
has_chartprops = true;
}
......
......@@ -750,18 +750,30 @@ define([
var win, props;
if (me.api){
props = me.api.asc_getChartObject();
var selectedObjects = me.api.asc_getGraphicObjectProps(),
imageSettings = null;
for (var i = 0; i < selectedObjects.length; i++) {
if (selectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) {
var elValue = selectedObjects[i].asc_getObjectValue();
if ( elValue.asc_getChartProperties() )
imageSettings = elValue;
}
}
if (props) {
var ischartedit = ( me.toolbar.mode.isEditDiagram || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChartText);
(new SSE.Views.ChartSettingsDlg(
{
chartSettings: props,
imageSettings: imageSettings,
isChart: true,
api: me.api,
handler: function(result, value) {
if (result == 'ok') {
if (me.api) {
(ischartedit) ? me.api.asc_editChartDrawingObject(value.chartSettings) : me.api.asc_addChartDrawingObject(value.chartSettings);
if (value.imageSettings)
me.api.asc_setGraphicObjectProps(value.imageSettings);
}
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
......
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