aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel/ninja.js
diff options
context:
space:
mode:
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