From 5158b47a9f4e6343b07d28a9dbf0795ded25b786 Mon Sep 17 00:00:00 2001 From: "Alexander.Trofimov" Date: Tue, 10 May 2016 14:52:24 +0300 Subject: [PATCH] flat_desine before create api --- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index ec0066b6f..e5a4c9adc 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -111,6 +111,7 @@ define([ // Initialize api + window["flat_desine"] = true; this.api = new Asc.asc_docs_api("editor_sdk"); if (this.api){ @@ -119,7 +120,6 @@ define([ case '1': this.api.SetFontRenderingMode(1); break; case '2': this.api.SetFontRenderingMode(2); break; } - window["flat_desine"] = true; this.api.asc_registerCallback('asc_onError', _.bind(this.onError, this)); this.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(this.onDocumentContentReady, this)); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 62d1de9f9..38020fe55 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -105,11 +105,10 @@ define([ // Initialize api + window["flat_desine"] = true; this.api = new Asc.asc_docs_api("editor_sdk"); if (this.api){ - window["flat_desine"] = true; - this.api.CreateComponents(); this.api.SetDrawingFreeze(true); this.api.SetThemesPath("../../../../sdkjs/slide/themes/");