aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/selection-controller.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-31 15:27:03 -0700
committerValerio Virgillito2012-05-31 15:27:03 -0700
commitffe6c157279e115f4658d8c66622085f05cfbf43 (patch)
tree7636a27a6f5fd32d853c118c4a0d16c51af32a36 /js/controllers/selection-controller.js
parent6307b0930f1a8452de954ae16e293da2f575db04 (diff)
downloadninja-ffe6c157279e115f4658d8c66622085f05cfbf43.tar.gz
fixing the switching between various types of documents
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers/selection-controller.js')
-rwxr-xr-xjs/controllers/selection-controller.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js
index a219c597..28c0f3d3 100755
--- a/js/controllers/selection-controller.js
+++ b/js/controllers/selection-controller.js
@@ -33,17 +33,19 @@ exports.SelectionController = Montage.create(Component, {
33 return; 33 return;
34 } 34 }
35 35
36 if(this._currentDocument) { 36 if(this._currentDocument && this._currentDocument.currentView === "design") {
37 this._currentDocument.model.selection = this.application.ninja.selectedElements; 37 this._currentDocument.model.selection = this.application.ninja.selectedElements;
38 this._currentDocument.model.selectionContainer = this.application.ninja._currentSelectedContainer; 38 this._currentDocument.model.selectionContainer = this.application.ninja._currentSelectedContainer;
39 } 39 }
40 40
41 this._currentDocument = value; 41 this._currentDocument = value;
42 42
43 /*
43 if(!value) { 44 if(!value) {
44 } else if(this._currentDocument.currentView === "design") { 45 } else if(this._currentDocument.currentView === "design") {
45 } else { 46 } else {
46 } 47 }
48 */
47 49
48 } 50 }
49 }, 51 },
@@ -57,6 +59,8 @@ exports.SelectionController = Montage.create(Component, {
57 return this._selectedElements; 59 return this._selectedElements;
58 }, 60 },
59 set: function(value) { 61 set: function(value) {
62 if(this.currentDocument && this.currentDocument.currentView === "code") return;
63
60 if(value) { 64 if(value) {
61 this._selectedElements = value; 65 this._selectedElements = value;
62 66