aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/controllers/styles-controller.js19
-rwxr-xr-xjs/ninja.reel/ninja.js33
2 files changed, 8 insertions, 44 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index f35a6757..83722184 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -48,25 +48,6 @@ var stylesController = exports.StylesController = Montage.create(Component, {
48 ///// bind the document to prop w/ setter. The setter calls to find 48 ///// bind the document to prop w/ setter. The setter calls to find
49 ///// the stage and default css files. 49 ///// the stage and default css files.
50 50
51 handleAppLoaded : {
52 value: function() {
53 ///// Bind app's currentDocument property to
54 ///// styles controller's _currentDocument property
55
56// Object.defineBinding(this, "currentDocument", {
57// boundObject: this.application.ninja,
58// boundObjectPropertyPath: "currentDocument",
59// oneway: true
60// });
61 }
62 },
63
64 deserializedFromTemplate : {
65 value: function() {
66 this.eventManager.addEventListener( "appLoaded", this, false);
67 },
68 enumerable : false
69 },
70 ///// Active document gets automatically set when the 51 ///// Active document gets automatically set when the
71 ///// document controller changes it 52 ///// document controller changes it
72 _currentDocument : { 53 _currentDocument : {
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 9593973e..ac883923 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -26,12 +26,6 @@ exports.Ninja = Montage.create(Component, {
26 value: AppData 26 value: AppData
27 }, 27 },
28 28
29 /*
30 currentDocument: {
31 value: null
32 },
33 */
34
35 documentList: { 29 documentList: {
36 value: null 30 value: null
37 }, 31 },
@@ -46,9 +40,6 @@ exports.Ninja = Montage.create(Component, {
46 } 40 }
47 }, 41 },
48 42
49 _isResizing: {
50 value: null
51 },
52 _resizedHeight : { 43 _resizedHeight : {
53 value: 0 44 value: 0
54 }, 45 },
@@ -199,8 +190,6 @@ exports.Ninja = Montage.create(Component, {
199 this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false); 190 this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false);
200 this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false); 191 this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false);
201 this.addPropertyChangeListener("appModel.debug", this.toggleDebug, false); 192 this.addPropertyChangeListener("appModel.debug", this.toggleDebug, false);
202
203 NJevent("appLoading");
204 } 193 }
205 }, 194 },
206 195
@@ -312,16 +301,20 @@ exports.Ninja = Montage.create(Component, {
312 value: function(document) { 301 value: function(document) {
313 var doc = this.documentList.content[this.documentList.content.indexOf(document)], activeDocument; 302 var doc = this.documentList.content[this.documentList.content.indexOf(document)], activeDocument;
314 303
315 if(this.documentList.selectedObjects[0] === doc) { 304 if(this.documentList.selectedObjects[0] !== doc) {
316 activeDocument = this.documentList.content[0];
317 } else {
318 activeDocument = this.documentList.selectedObjects[0]; 305 activeDocument = this.documentList.selectedObjects[0];
306 } else {
307 activeDocument = null;
319 } 308 }
320 309
321 this.documentList.removeObjects(doc); 310 this.documentList.removeObjects(doc);
322 311
323 if(this.documentList.content.length) { 312 if(activeDocument) {
324 this.documentList.selectedObjects = [activeDocument]; 313 this.documentList.selectedObjects = [activeDocument];
314 } else {
315 if(this.documentList.content.length) {
316 this.documentList.selectedObjects = this.documentList.content[0];
317 }
325 } 318 }
326 } 319 }
327 }, 320 },
@@ -383,16 +376,6 @@ exports.Ninja = Montage.create(Component, {
383 } 376 }
384 }, 377 },
385 378
386 getCurrentToolInstance: {
387 value: function() {
388 if(this.toolsData.selectedTool.container) {
389 return this.toolsList[this.toolsData.selectedSubTool.action];
390 } else {
391 return this.toolsList[this.toolsData.selectedTool.action];
392 }
393 }
394 },
395
396 setupGlobalHelpers: { 379 setupGlobalHelpers: {
397 value: function() { 380 value: function() {
398 381