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.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 4c1efff4..9593973e 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -296,9 +296,6 @@ exports.Ninja = Montage.create(Component, {
296 296
297 openDocument: { 297 openDocument: {
298 value: function(doc) { 298 value: function(doc) {
299
300
301
302 this.documentList.content.push(doc); 299 this.documentList.content.push(doc);
303 // This is not needed with the latest 0.10 montage. 300 // This is not needed with the latest 0.10 montage.
304 // TODO: Remove this when integrating the next montage 301 // TODO: Remove this when integrating the next montage
@@ -308,19 +305,24 @@ exports.Ninja = Montage.create(Component, {
308 // TODO: Bind directly to the model of the document in components instead of this property 305 // TODO: Bind directly to the model of the document in components instead of this property
309 this.currentSelectedContainer = doc.model.documentRoot; 306 this.currentSelectedContainer = doc.model.documentRoot;
310 } 307 }
311
312
313// this.appModel.show3dGrid = this.currentDocument.draw3DGrid;
314
315
316 } 308 }
317 }, 309 },
318 310
319 closeFile: { 311 closeFile: {
320 value: function(document) { 312 value: function(document) {
321 var doc = this.documentList.content[this.documentList.content.indexOf(document)]; 313 var doc = this.documentList.content[this.documentList.content.indexOf(document)], activeDocument;
314
315 if(this.documentList.selectedObjects[0] === doc) {
316 activeDocument = this.documentList.content[0];
317 } else {
318 activeDocument = this.documentList.selectedObjects[0];
319 }
322 320
323 this.documentList.removeObjects(doc); 321 this.documentList.removeObjects(doc);
322
323 if(this.documentList.content.length) {
324 this.documentList.selectedObjects = [activeDocument];
325 }
324 } 326 }
325 }, 327 },
326 328