Fix Bug 40746

This commit is contained in:
Julia Radzhabova 2019-03-01 16:10:20 +03:00
parent e373415ee9
commit f8f4aad60d

View file

@ -51,7 +51,8 @@ define([
var appLang = 'en', var appLang = 'en',
customization = undefined, customization = undefined,
targetApp = '', targetApp = '',
externalEditor = null; externalEditor = null,
isAppFirstOpened = true;
var createExternalEditor = function() { var createExternalEditor = function() {
@ -106,6 +107,11 @@ define([
if (externalEditor) { if (externalEditor) {
externalEditor.serviceCommand('setAppDisabled',false); externalEditor.serviceCommand('setAppDisabled',false);
if (isAppFirstOpened && this.diagramEditorView._isExternalDocReady) {
isAppFirstOpened = false;
this.diagramEditorView._chartData && this.setChartData();
}
if (this.needDisableEditing && this.diagramEditorView._isExternalDocReady) { if (this.needDisableEditing && this.diagramEditorView._isExternalDocReady) {
this.onDiagrammEditingDisabled(); this.onDiagrammEditingDisabled();
} }
@ -150,8 +156,10 @@ define([
}, },
setChartData: function() { setChartData: function() {
externalEditor && externalEditor.serviceCommand('setChartData', this.diagramEditorView._chartData); if (!isAppFirstOpened) {
this.diagramEditorView._chartData = null; externalEditor && externalEditor.serviceCommand('setChartData', this.diagramEditorView._chartData);
this.diagramEditorView._chartData = null;
}
}, },
loadConfig: function(data) { loadConfig: function(data) {
@ -190,10 +198,8 @@ define([
if (this.diagramEditorView) { if (this.diagramEditorView) {
if (eventData.type == 'documentReady') { if (eventData.type == 'documentReady') {
this.diagramEditorView._isExternalDocReady = true; this.diagramEditorView._isExternalDocReady = true;
if (this.diagramEditorView._chartData) { this.isExternalEditorVisible && (isAppFirstOpened = false);
externalEditor && externalEditor.serviceCommand('setChartData', this.diagramEditorView._chartData); this.diagramEditorView._chartData && this.setChartData();
this.diagramEditorView._chartData = null;
}
if (this.needDisableEditing) { if (this.needDisableEditing) {
this.onDiagrammEditingDisabled(); this.onDiagrammEditingDisabled();
} }