aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-04-24 10:06:45 -0700
committerJose Antonio Marquez2012-04-24 10:06:45 -0700
commit60c4f4e38cd0c516a0840bec416a688d0bad0d49 (patch)
tree3f383cb4b9e92dcb7f80eed62ff6cbc467062448 /js/ninja.reel
parentae4cc0daf3ed23ed2191ead1b795a5b0cc54a3a7 (diff)
parent55e6d621b9555abac06ab4adff44dfe29a78ec4e (diff)
downloadninja-60c4f4e38cd0c516a0840bec416a688d0bad0d49.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into FileIO
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 }