aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel
diff options
context:
space:
mode:
authorAnanya Sen2012-04-26 12:57:56 -0700
committerAnanya Sen2012-04-26 12:57:56 -0700
commitb2132103b12e499f26e6e0f311d48555a9f733ff (patch)
tree2eaa000b460e4be3c8050a369318584b2591e8d7 /js/ninja.reel
parent07c611323c109aaa2208ebc15a354b81c3f04a0d (diff)
parent902dc18296fc78f3b8e67d952c42981d926bb2fc (diff)
downloadninja-b2132103b12e499f26e6e0f311d48555a9f733ff.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into Codeview-improvements
Conflicts: js/controllers/document-controller.js Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-xjs/ninja.reel/ninja.js29
1 files changed, 14 insertions, 15 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 9b5081dd..d2d45410 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -10,6 +10,7 @@ var Montage = require("montage/core/core").Montage,
10 AppData = require("js/data/appdata").AppData; 10 AppData = require("js/data/appdata").AppData;
11 11
12var matrix = require("js/lib/math/matrix"); 12var matrix = require("js/lib/math/matrix");
13var NjUtils = require("js/lib/NJUtils").NJUtils;
13 14
14exports.Ninja = Montage.create(Component, { 15exports.Ninja = Montage.create(Component, {
15 16
@@ -143,6 +144,7 @@ exports.Ninja = Montage.create(Component, {
143 value: function() { 144 value: function() {
144 this.ninjaVersion = window.ninjaVersion.ninja.version; 145 this.ninjaVersion = window.ninjaVersion.ninja.version;
145 this.undoManager = document.application.undoManager = UndoManager.create(); 146 this.undoManager = document.application.undoManager = UndoManager.create();
147 document.application.njUtils = NjUtils;
146 } 148 }
147 }, 149 },
148 150
@@ -187,28 +189,18 @@ exports.Ninja = Montage.create(Component, {
187 189
188 willDraw: { 190 willDraw: {
189 value: function() { 191 value: function() {
190
191 } 192 }
192 }, 193 },
193 194
194 draw: { 195 draw: {
195 value: function() { 196 value: function() {
196 if(this.isResizing) { 197 if(this.isResizing) {
197 if (this.height - this._resizedHeight < 46) { 198 this.timelineSplitter.collapsed = this.height - this._resizedHeight < 46;
198 this.timelineSplitter.collapsed = true; 199 this.panelSplitter.collapsed = this.width - this._resizedWidth < 30;
199 } else {
200 this.timelineSplitter.collapsed = false;
201 }
202
203 if (this.width - this._resizedWidth < 30) {
204 this.panelSplitter.collapsed = true;
205 } else {
206 this.panelSplitter.collapsed = false;
207 }
208
209 } 200 }
210 this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px"; 201
211 this.timeline.element.style.height = (this.height - this._resizedHeight) + "px"; 202 this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px";
203 this.timeline.element.style.height = (this.height - this._resizedHeight) + "px";
212 } 204 }
213 }, 205 },
214 206
@@ -277,6 +269,13 @@ exports.Ninja = Montage.create(Component, {
277 value: function(event) { 269 value: function(event) {
278 this.currentDocument = event.detail; 270 this.currentDocument = event.detail;
279 271
272 if(this.currentDocument.documentRoot) {
273 this.application.ninja.currentSelectedContainer = this.currentDocument.documentRoot;
274 } else {
275 alert("The current document has not loaded yet");
276 return;
277 }
278
280 this.appModel.show3dGrid = this.currentDocument.draw3DGrid; 279 this.appModel.show3dGrid = this.currentDocument.draw3DGrid;
281 NJevent("openDocument"); 280 NJevent("openDocument");
282 } 281 }