|
@@ -9,21 +9,27 @@ import PresetsManager from '../ctrl/PresetsManager';
|
|
|
import PubSub from 'pubsub-js';
|
|
|
import VectorDataManager from '../ctrl/VectorDataManager';
|
|
|
import request from 'request-promise-native';
|
|
|
-/**
|
|
|
- * App is the application starter.
|
|
|
- * It creates mostly everything.
|
|
|
+
|
|
|
+
|
|
|
+/*
|
|
|
+ * Global variables definition
|
|
|
*/
|
|
|
window.EDITOR_URL = window.location.origin + window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + "/";
|
|
|
window.UNUSABLE_ICONS = new Set();
|
|
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
+ * App is the application starter.
|
|
|
+ * It creates mostly everything.
|
|
|
+ */
|
|
|
export default class App {
|
|
|
constructor(uuid) {
|
|
|
this.uuid = uuid;
|
|
|
this._initI18n();
|
|
|
- this._initCtrl();
|
|
|
-
|
|
|
+ this._initCtrl();
|
|
|
+
|
|
|
+ // Dynamically load config file
|
|
|
request(window.EDITOR_URL + "/config.json")
|
|
|
.then(configTxt => {
|
|
|
window.CONFIG = JSON.parse(configTxt);
|