diff options
author | Ananya Sen | 2012-02-29 10:12:38 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-29 10:12:38 -0800 |
commit | 7a9c2a91dfbbdd0cd7c79d81be5aeecd7887e7f1 (patch) | |
tree | 27c7f39c01551d534fa8fa470fe2785bbf3d381b /js/controllers | |
parent | 1c7e86b6c2c802d720cc3075f75c7a61866ebc07 (diff) | |
download | ninja-7a9c2a91dfbbdd0cd7c79d81be5aeecd7887e7f1.tar.gz |
handle selections for switching documents
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/selection-controller.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index 62313960..0f2a16e0 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js | |||
@@ -92,7 +92,11 @@ exports.SelectionController = Montage.create(Component, { | |||
92 | handleSwitchDocument: { | 92 | handleSwitchDocument: { |
93 | value: function() { | 93 | value: function() { |
94 | this._selectedItems = this.application.ninja.selectedElements.slice(0); | 94 | this._selectedItems = this.application.ninja.selectedElements.slice(0); |
95 | this._isDocument = false; | 95 | if(this._selectedItems.length === 0){ |
96 | this._isDocument = true; | ||
97 | }else{ | ||
98 | this._isDocument = false; | ||
99 | } | ||
96 | NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); | 100 | NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); |
97 | } | 101 | } |
98 | }, | 102 | }, |