From fa672d92bb092b4d5d8c322c84c9214a582dc4cf Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Thu, 27 Sep 2018 20:23:04 -0700 Subject: [PATCH] fix project loading --- web/app/cad/init/lifecyclePlugin.js | 5 ++++- web/app/cad/sketch/sketcherPlugin.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/web/app/cad/init/lifecyclePlugin.js b/web/app/cad/init/lifecyclePlugin.js index 30d5b7e0..f3551954 100644 --- a/web/app/cad/init/lifecyclePlugin.js +++ b/web/app/cad/init/lifecyclePlugin.js @@ -18,6 +18,9 @@ export function activate({streams, services}) { console.log("project loaded, took: " + ((onLoadTime - startTime) / 1000).toFixed(2) + ' sec'); } }, - declareAppReady: () => streams.lifecycle.appReady.value = true + declareAppReady: () => { + streams.lifecycle.appReady.value = true + services.lifecycle.loadProjectRequest(); + } } } diff --git a/web/app/cad/sketch/sketcherPlugin.js b/web/app/cad/sketch/sketcherPlugin.js index 71659fc2..9abd871d 100644 --- a/web/app/cad/sketch/sketcherPlugin.js +++ b/web/app/cad/sketch/sketcherPlugin.js @@ -88,7 +88,7 @@ export function activate(ctx) { services.appTabs.show(face.id, 'Sketch ' + face.id, 'sketcher.html#' + sketchURL); } - streams.craft.modifications.attach(updateAllSketches); + streams.craft.models.attach(updateAllSketches); services.sketcher = { sketchFace, sketchFace2D, updateAllSketches, getAllSketches, readSketch, inPlaceEditor