From c62273126004f057de40ce91ecda5606643f4c92 Mon Sep 17 00:00:00 2001
From: Valerio Virgillito
Date: Fri, 20 Apr 2012 16:37:47 -0700
Subject: reverting old template to current working status. New template work.

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

(limited to 'js/ninja.reel')

diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 9b5081dd..2fedd71d 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -10,6 +10,7 @@ var Montage = require("montage/core/core").Montage,
     AppData     = require("js/data/appdata").AppData;
 
 var matrix = require("js/lib/math/matrix");
+var NjUtils = require("js/lib/NJUtils").NJUtils;
 
 exports.Ninja = Montage.create(Component, {
 
@@ -143,6 +144,7 @@ exports.Ninja = Montage.create(Component, {
         value: function() {
             this.ninjaVersion = window.ninjaVersion.ninja.version;
             this.undoManager = document.application.undoManager = UndoManager.create();
+            document.application.njUtils = NjUtils;
         }
     },
 
@@ -187,28 +189,18 @@ exports.Ninja = Montage.create(Component, {
 
     willDraw: {
         value: function() {
-
         }
     },
 
     draw: {
         value: function() {
             if(this.isResizing) {
-                if (this.height - this._resizedHeight < 46) {
-                    this.timelineSplitter.collapsed = true;
-                } else {
-                    this.timelineSplitter.collapsed = false;
-                }
-
-                if (this.width - this._resizedWidth < 30) {
-                    this.panelSplitter.collapsed = true;
-                } else {
-                    this.panelSplitter.collapsed = false;
-                }
-
+                this.timelineSplitter.collapsed = this.height - this._resizedHeight < 46;
+                this.panelSplitter.collapsed = this.width - this._resizedWidth < 30;
             }
-                this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px";
-                this.timeline.element.style.height = (this.height - this._resizedHeight) + "px";
+
+            this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px";
+            this.timeline.element.style.height = (this.height - this._resizedHeight) + "px";
         }
     },
 
-- 
cgit v1.2.3


From d0af21d80441cb7ffe3a92ed00f8dc9b90867098 Mon Sep 17 00:00:00 2001
From: Valerio Virgillito
Date: Mon, 23 Apr 2012 13:41:16 -0700
Subject: adjusting the bread crumb to work with the new template

Initial container get setup in ninja now.

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

(limited to 'js/ninja.reel')

diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 2fedd71d..d2d45410 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -269,6 +269,13 @@ exports.Ninja = Montage.create(Component, {
         value: function(event) {
             this.currentDocument = event.detail;
 
+            if(this.currentDocument.documentRoot) {
+                this.application.ninja.currentSelectedContainer = this.currentDocument.documentRoot;
+            } else {
+                alert("The current document has not loaded yet");
+                return;
+            }
+
             this.appModel.show3dGrid = this.currentDocument.draw3DGrid;
             NJevent("openDocument");
         }
-- 
cgit v1.2.3