diff options
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/selection-controller.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index 9ae1cfc9..6d982e69 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js | |||
@@ -34,6 +34,7 @@ exports.SelectionController = Montage.create(Component, { | |||
34 | } | 34 | } |
35 | 35 | ||
36 | if(this._currentDocument && this._currentDocument.currentView === "design") { | 36 | if(this._currentDocument && this._currentDocument.currentView === "design") { |
37 | this.ignoreFlag = false; | ||
37 | this._currentDocument.model._selection = this.application.ninja.selectedElements; | 38 | this._currentDocument.model._selection = this.application.ninja.selectedElements; |
38 | // this._currentDocument.model.selectionContainer = this.application.ninja._currentSelectedContainer; | 39 | // this._currentDocument.model.selectionContainer = this.application.ninja._currentSelectedContainer; |
39 | } | 40 | } |
@@ -50,6 +51,10 @@ exports.SelectionController = Montage.create(Component, { | |||
50 | } | 51 | } |
51 | }, | 52 | }, |
52 | 53 | ||
54 | ignoreFlag: { | ||
55 | value: true | ||
56 | }, | ||
57 | |||
53 | _selectedElements: { | 58 | _selectedElements: { |
54 | value: null | 59 | value: null |
55 | }, | 60 | }, |
@@ -91,10 +96,14 @@ exports.SelectionController = Montage.create(Component, { | |||
91 | 96 | ||
92 | handleChange: { | 97 | handleChange: { |
93 | value: function() { | 98 | value: function() { |
94 | if(this.currentDocument && this.currentDocument.model.getProperty("domContainer")) { | 99 | if(this.ignoreFlag) { |
95 | if(this.currentDocument.model.getProperty("domContainer") !== null) { | 100 | if(this.currentDocument && this.currentDocument.model.getProperty("domContainer")) { |
96 | this.executeSelectElement(); | 101 | if(this.currentDocument.model.getProperty("domContainer") !== null) { |
102 | this.executeSelectElement(); | ||
103 | } | ||
97 | } | 104 | } |
105 | } else { | ||
106 | this.ignoreFlag = true; | ||
98 | } | 107 | } |
99 | } | 108 | } |
100 | }, | 109 | }, |