aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/selection-controller.js
diff options
context:
space:
mode:
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