diff options
author | Valerio Virgillito | 2012-03-13 11:15:34 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-03-13 11:15:34 -0700 |
commit | f6b958360d82854bdaf51848e7fd715d1f633179 (patch) | |
tree | 80f6c08bb730089bdd3f26310df8d2363f9ba863 /js/controllers/selection-controller.js | |
parent | c24f58c10231c30d3a8a4c9fb9a4f395dd746180 (diff) | |
parent | 4d7b86f55c504ee4e8c2460cf6b60cb9a2cf18f0 (diff) | |
download | ninja-f6b958360d82854bdaf51848e7fd715d1f633179.tar.gz |
Merge pull request #105 from joseeight/FileIO-Build-Candidate
File I/O adding webGL/canvas data functionality
Diffstat (limited to 'js/controllers/selection-controller.js')
-rwxr-xr-x | js/controllers/selection-controller.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index 75968d4a..c713b6e5 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js | |||
@@ -48,6 +48,7 @@ exports.SelectionController = Montage.create(Component, { | |||
48 | this.eventManager.addEventListener("selectAll", this, false); | 48 | this.eventManager.addEventListener("selectAll", this, false); |
49 | this.eventManager.addEventListener("deleteSelection", this, false); | 49 | this.eventManager.addEventListener("deleteSelection", this, false); |
50 | this.eventManager.addEventListener("switchDocument", this, false); | 50 | this.eventManager.addEventListener("switchDocument", this, false); |
51 | this.eventManager.addEventListener("closeDocument", this, false); | ||
51 | // defaultEventManager.addEventListener( "undo", this, false); | 52 | // defaultEventManager.addEventListener( "undo", this, false); |
52 | // defaultEventManager.addEventListener( "redo", this, false); | 53 | // defaultEventManager.addEventListener( "redo", this, false); |
53 | } | 54 | } |
@@ -89,17 +90,17 @@ exports.SelectionController = Montage.create(Component, { | |||
89 | } | 90 | } |
90 | }, | 91 | }, |
91 | 92 | ||
92 | handleSwitchDocument: { | 93 | handleSwitchDocument: { |
93 | value: function() { | 94 | value: function() { |
94 | this._selectedItems = this.application.ninja.selectedElements.slice(0); | 95 | if(this.application.ninja.documentController.activeDocument.currentView === "design"){ |
95 | if(this._selectedItems.length === 0) { | 96 | this._selectedItems = this.application.ninja.selectedElements.slice(0); |
96 | this._isDocument = true; | 97 | if(this._selectedItems.length === 0 ){ |
97 | } else { | 98 | this._isDocument = true; |
98 | this._isDocument = false; | 99 | }else{ |
100 | this._isDocument = false; | ||
101 | } | ||
102 | NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); | ||
99 | } | 103 | } |
100 | NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument}); | ||
101 | |||
102 | this._selectionContainer = this.application.ninja.currentSelectedContainer; | ||
103 | } | 104 | } |
104 | }, | 105 | }, |
105 | 106 | ||