From 8ffe894047f49732f7538247d29b44d85248a53f Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Sun, 23 May 2021 19:01:23 +0200 Subject: [PATCH] refactor index.js to make it even simpler. --- src/editor/Editor.js | 7 +++++++ src/editor/index.js | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/editor/Editor.js b/src/editor/Editor.js index 45c7168c..d2e6d424 100644 --- a/src/editor/Editor.js +++ b/src/editor/Editor.js @@ -14,6 +14,13 @@ * @module SVGEditor */ +import jQuery from 'jquery/dist/jquery.slim.js'; +import jQueryPluginSVG from '../svgcanvas/jQuery.attr.js'; // Needed for SVG attribute +import './components/index.js'; +import './dialogs/index.js'; +// Global Constant +window.$ = jQueryPluginSVG(jQuery); + import './touch.js'; import { isMac } from '../common/browser.js'; diff --git a/src/editor/index.js b/src/editor/index.js index 43adc2f9..71a44276 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -4,15 +4,8 @@ For default config and extensions (and available options) available to `setConfig()`, see the file `docs/tutorials/ConfigOptions.md` */ -import jQuery from 'jquery/dist/jquery.slim.js'; -import jQueryPluginSVG from '../svgcanvas/jQuery.attr.js'; // Needed for SVG attribute -import './components/index.js'; -import './dialogs/index.js'; import Editor from './Editor.js'; -// Global Constant -window.$ = jQueryPluginSVG(jQuery); - const svgEditor = new Editor(); svgEditor.init();