@dualbox/editor 1.0.56 → 1.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45035,8 +45035,7 @@ class AppManager {
|
|
|
45035
45035
|
load(cb) {
|
|
45036
45036
|
if (this.loaded) {
|
|
45037
45037
|
cb();
|
|
45038
|
-
}
|
|
45039
|
-
else {
|
|
45038
|
+
} else {
|
|
45040
45039
|
/* todo: load dynamically .js ressources from the app */
|
|
45041
45040
|
this.loaded = true;
|
|
45042
45041
|
cb();
|
|
@@ -45060,10 +45059,9 @@ class AppManager {
|
|
|
45060
45059
|
options.options.debug.record = options.options.debug.record || false;
|
|
45061
45060
|
options.ressources = window.DualBoxRessources || {};
|
|
45062
45061
|
|
|
45063
|
-
this.app = window.DualBox.start(options);
|
|
45062
|
+
this.app = window.app = window.DualBox.start(options);
|
|
45064
45063
|
this.app.start(cb);
|
|
45065
|
-
}
|
|
45066
|
-
else {
|
|
45064
|
+
} else {
|
|
45067
45065
|
setTimeout(this.run.bind(this, json, options, cb), 1000);
|
|
45068
45066
|
}
|
|
45069
45067
|
}
|
|
@@ -104267,11 +104265,13 @@ class DualboxEditor {
|
|
|
104267
104265
|
|
|
104268
104266
|
// Safety when the user leave the page,
|
|
104269
104267
|
// if not already defined externally
|
|
104268
|
+
/*
|
|
104270
104269
|
if (!window.onbeforeunload) {
|
|
104271
104270
|
window.onbeforeunload = function() {
|
|
104272
104271
|
return "Unsaved changes will be lost, are you sure you want to leave the editor?";
|
|
104273
104272
|
};
|
|
104274
104273
|
}
|
|
104274
|
+
*/
|
|
104275
104275
|
|
|
104276
104276
|
this.loadCorePackages();
|
|
104277
104277
|
|
package/js/src/GraphEditor.js
CHANGED
|
@@ -210,11 +210,13 @@ class DualboxEditor {
|
|
|
210
210
|
|
|
211
211
|
// Safety when the user leave the page,
|
|
212
212
|
// if not already defined externally
|
|
213
|
+
/*
|
|
213
214
|
if (!window.onbeforeunload) {
|
|
214
215
|
window.onbeforeunload = function() {
|
|
215
216
|
return "Unsaved changes will be lost, are you sure you want to leave the editor?";
|
|
216
217
|
};
|
|
217
218
|
}
|
|
219
|
+
*/
|
|
218
220
|
|
|
219
221
|
this.loadCorePackages();
|
|
220
222
|
|
package/js/src/v/AppManager.js
CHANGED
|
@@ -21,8 +21,7 @@ class AppManager {
|
|
|
21
21
|
load(cb) {
|
|
22
22
|
if (this.loaded) {
|
|
23
23
|
cb();
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
24
|
+
} else {
|
|
26
25
|
/* todo: load dynamically .js ressources from the app */
|
|
27
26
|
this.loaded = true;
|
|
28
27
|
cb();
|
|
@@ -46,10 +45,9 @@ class AppManager {
|
|
|
46
45
|
options.options.debug.record = options.options.debug.record || false;
|
|
47
46
|
options.ressources = window.DualBoxRessources || {};
|
|
48
47
|
|
|
49
|
-
this.app = window.DualBox.start(options);
|
|
48
|
+
this.app = window.app = window.DualBox.start(options);
|
|
50
49
|
this.app.start(cb);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
50
|
+
} else {
|
|
53
51
|
setTimeout(this.run.bind(this, json, options, cb), 1000);
|
|
54
52
|
}
|
|
55
53
|
}
|
|
@@ -59,4 +57,4 @@ class AppManager {
|
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
|
|
62
|
-
export default AppManager;
|
|
60
|
+
export default AppManager;
|