diff --git a/src/editor/Editor.js b/src/editor/Editor.js index 2a87e055..45c7168c 100644 --- a/src/editor/Editor.js +++ b/src/editor/Editor.js @@ -111,16 +111,6 @@ class Editor extends EditorStartup { this.layersPanel = new LayersPanel(this); this.mainMenu = new MainMenu(this); window.svgEditor = this; - this.loadComponentAndDialog(); - } - /** - * @returns {void} - */ - async loadComponentAndDialog() { - // eslint-disable-next-line no-unsanitized/method - // await import(`./components/index.js`); - // eslint-disable-next-line no-unsanitized/method - await import(`./dialogs/index.js`); } /** * diff --git a/src/editor/EditorStartup.js b/src/editor/EditorStartup.js index 7042b873..8628f6ba 100644 --- a/src/editor/EditorStartup.js +++ b/src/editor/EditorStartup.js @@ -68,6 +68,10 @@ class EditorStartup { const self = this; const { i18next } = await putLocale(this.configObj.pref('lang'), this.goodLangs); this.i18next = i18next; + // eslint-disable-next-line no-unsanitized/method + await import(`./components/index.js`); + // eslint-disable-next-line no-unsanitized/method + await import(`./dialogs/index.js`); // allow to prepare the dom without display this.$svgEditor.style.visibility = 'hidden'; try { diff --git a/src/editor/MainMenu.js b/src/editor/MainMenu.js index 11f3581a..16846e4f 100644 --- a/src/editor/MainMenu.js +++ b/src/editor/MainMenu.js @@ -86,7 +86,7 @@ class MainMenu { // Set image save option this.editor.configObj.pref("img_save", save); this.editor.updateCanvas(); - this.editor.hideDocProperties(); + this.hideDocProperties(); return true; } /** diff --git a/src/editor/components/sePalette.js b/src/editor/components/sePalette.js index eb844693..c679ed7d 100644 --- a/src/editor/components/sePalette.js +++ b/src/editor/components/sePalette.js @@ -1,4 +1,5 @@ /* eslint-disable max-len */ +/* globals svgEditor */ const palette = [ // Todo: Make into configuration item? 'none', '#000000', '#3f3f3f', '#7f7f7f', '#bfbfbf', '#ffffff', @@ -14,6 +15,7 @@ const palette = [ ]; const template = document.createElement('template'); +// eslint-disable-next-line no-unsanitized/property template.innerHTML = ` -