[SSE] Bug 34159.
This commit is contained in:
parent
51b2f78490
commit
497b5313ce
|
@ -695,12 +695,15 @@ define([
|
||||||
(new SSE.Views.ChartSettingsDlg(
|
(new SSE.Views.ChartSettingsDlg(
|
||||||
{
|
{
|
||||||
chartSettings: props,
|
chartSettings: props,
|
||||||
|
imageSettings: item.chartInfo,
|
||||||
isChart: true,
|
isChart: true,
|
||||||
api: me.api,
|
api: me.api,
|
||||||
handler: function(result, value) {
|
handler: function(result, value) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
me.api.asc_editChartDrawingObject(value.chartSettings);
|
me.api.asc_editChartDrawingObject(value.chartSettings);
|
||||||
|
if (value.imageSettings)
|
||||||
|
me.api.asc_setGraphicObjectProps(value.imageSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete', me);
|
Common.NotificationCenter.trigger('edit:complete', me);
|
||||||
|
@ -1205,6 +1208,7 @@ define([
|
||||||
isshapemenu = true;
|
isshapemenu = true;
|
||||||
}
|
}
|
||||||
} else if ( elValue.asc_getChartProperties() ) {
|
} else if ( elValue.asc_getChartProperties() ) {
|
||||||
|
documentHolder.mnuChartEdit.chartInfo = elValue;
|
||||||
ischartmenu = true;
|
ischartmenu = true;
|
||||||
has_chartprops = true;
|
has_chartprops = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -750,18 +750,30 @@ define([
|
||||||
var win, props;
|
var win, props;
|
||||||
if (me.api){
|
if (me.api){
|
||||||
props = me.api.asc_getChartObject();
|
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) {
|
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);
|
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(
|
(new SSE.Views.ChartSettingsDlg(
|
||||||
{
|
{
|
||||||
chartSettings: props,
|
chartSettings: props,
|
||||||
|
imageSettings: imageSettings,
|
||||||
isChart: true,
|
isChart: true,
|
||||||
api: me.api,
|
api: me.api,
|
||||||
handler: function(result, value) {
|
handler: function(result, value) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
(ischartedit) ? me.api.asc_editChartDrawingObject(value.chartSettings) : me.api.asc_addChartDrawingObject(value.chartSettings);
|
(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);
|
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||||
|
|
Loading…
Reference in a new issue