aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel/ninja.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-01 06:53:58 -0700
committerNivesh Rajbhandari2012-06-01 06:53:58 -0700
commit69ca67093bb53188dca5437e0bfbfb7f676ada85 (patch)
treecc2b387c796b0f34f1ab00a7c542c335d52005e9 /js/ninja.reel/ninja.js
parentb7f048624c07a1186cca080bf4c9a87af7d53f35 (diff)
parent7fcb10270f9e19415f8452c261c2d0c86916a29a (diff)
downloadninja-69ca67093bb53188dca5437e0bfbfb7f676ada85.tar.gz
Merge branch 'refs/heads/valerio-document-bindings-fix' into document-bindings-fix
Conflicts: js/stage/stage.reel/stage.js Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
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