aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel/ninja.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-01 00:16:31 -0700
committerValerio Virgillito2012-06-01 00:16:31 -0700
commit3a3a2351ea2d816bf953cbf76622772f7d64aa8b (patch)
tree0e26399a2bbf4702aeb30de9a8f46442ca8b99ab /js/ninja.reel/ninja.js
parent6ae2ff1ce956e518918f65099d052bb42186dc94 (diff)
downloadninja-3a3a2351ea2d816bf953cbf76622772f7d64aa8b.tar.gz
fixing the code editor, closing documents and cleanup of the stage
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/ninja.reel/ninja.js')
-rwxr-xr-xjs/ninja.reel/ninja.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 4c1efff4..e9e1e31c 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -318,9 +318,19 @@ exports.Ninja = Montage.create(Component, {
318 318
319 closeFile: { 319 closeFile: {
320 value: function(document) { 320 value: function(document) {
321 var doc = this.documentList.content[this.documentList.content.indexOf(document)]; 321 var doc = this.documentList.content[this.documentList.content.indexOf(document)], activeDocument;
322
323 if(this.documentList.selectedObjects[0] === doc) {
324 activeDocument = this.documentList.content[0];
325 } else {
326 activeDocument = this.documentList.selectedObjects[0];
327 }
322 328
323 this.documentList.removeObjects(doc); 329 this.documentList.removeObjects(doc);
330
331 if(this.documentList.content.length) {
332 this.documentList.selectedObjects = [activeDocument];
333 }
324 } 334 }
325 }, 335 },
326 336