@dualbox/editor 1.0.21 → 1.0.23
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.
package/js/src/GraphEditor.js
CHANGED
|
@@ -347,7 +347,10 @@ class DualboxEditor {
|
|
|
347
347
|
|
|
348
348
|
if( attrs.json ) {
|
|
349
349
|
this.onReady(() => {
|
|
350
|
-
this.setApp(attrs.json);
|
|
350
|
+
var p = this.setApp(attrs.json);
|
|
351
|
+
if( attrs.onLoaded ) {
|
|
352
|
+
p.then(attrs.onLoaded);
|
|
353
|
+
}
|
|
351
354
|
});
|
|
352
355
|
}
|
|
353
356
|
}
|
|
@@ -372,7 +375,7 @@ class DualboxEditor {
|
|
|
372
375
|
}
|
|
373
376
|
|
|
374
377
|
setApp(json) {
|
|
375
|
-
this.c.load(json);
|
|
378
|
+
return this.c.load(json);
|
|
376
379
|
}
|
|
377
380
|
|
|
378
381
|
getApp() {
|
|
@@ -547,7 +547,7 @@ class GraphController {
|
|
|
547
547
|
|
|
548
548
|
load( json ) {
|
|
549
549
|
// first load the packages
|
|
550
|
-
this.e.loadPackages(json).then( async () => {
|
|
550
|
+
return this.e.loadPackages(json).then( async () => {
|
|
551
551
|
console.log('LOADED ALL PACKAGES !');
|
|
552
552
|
|
|
553
553
|
// hold state saving for now
|