diff options
author | Ananya Sen | 2012-02-28 15:48:55 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-28 15:48:55 -0800 |
commit | a230f0cd065613a1bc933e3d6d3f7e77f52bec04 (patch) | |
tree | 8f9c910da7f3aa794aa8f7949d18edcde1974e63 /js | |
parent | 5ab7efb9949e486395659c383064a08821febdae (diff) | |
download | ninja-a230f0cd065613a1bc933e3d6d3f7e77f52bec04.tar.gz |
selection controller sets _isDocument = true if number of selections are 0, on switch document
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-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..c4623d3f 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 | }, |