From 84332ab81c1b445195f1d9be8bbeae0725c8e758 Mon Sep 17 00:00:00 2001
From: Valerio Virgillito
Date: Tue, 6 Mar 2012 10:58:25 -0800
Subject: Squashed commit of preload-fix into Master

- Requiring all the previously pre-loaded files
- RDGE, Codemirror and gl-matrix are not included via a script tag.

Signed-off-by: Valerio Virgillito <valerio@motorola.com>
---
 js/ninja.reel/ninja.js | 30 +++---------------------------
 1 file changed, 3 insertions(+), 27 deletions(-)

(limited to 'js/ninja.reel/ninja.js')

diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 6efeef8a..88361fd9 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -8,10 +8,9 @@ var Montage = require("montage/core/core").Montage,
     Component   = require("montage/ui/component").Component,
     AppData     = require("js/data/appdata").AppData;
 
-exports.Ninja = Montage.create(Component, {
+var matrix = require("js/lib/math/matrix");
 
-    _appLoaded: { value: false },
-    _preload: { value: false },
+exports.Ninja = Montage.create(Component, {
 
     ninjaVersion: {
         value: null
@@ -54,7 +53,7 @@ exports.Ninja = Montage.create(Component, {
 
             window.addEventListener("resize", this, false);
 
-            this.eventManager.addEventListener( "appLoading", this, false);
+//            this.eventManager.addEventListener( "appLoading", this, false); // Don't need this anymore
             this.eventManager.addEventListener( "selectTool", this, false);
             this.eventManager.addEventListener( "selectSubTool", this, false);
             this.eventManager.addEventListener( "onOpenDocument", this, false);
@@ -79,29 +78,6 @@ exports.Ninja = Montage.create(Component, {
         }
     },
 
-    handlePreloadFinish: {
-            value: function(e) {
-                this._preload = true;
-                this.appLoaded();
-            }
-    },
-
-    handleAppLoading: {
-        value: function(e) {
-            this._appLoaded = true;
-            this.appLoaded();
-        }
-    },
-
-    appLoaded: {
-        value: function() {
-            if(this._appLoaded && this._preload) {
-                // App is now deserialized and files are preloaded
-                this.appModel.materials = MaterialsLibrary.materials;
-            }
-        }
-    },
-
     _didDraw: {
         value: false
     },
-- 
cgit v1.2.3