diff options
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/SelectionTool.js | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js index f76a6d85..37029e8c 100755 --- a/js/tools/SelectionTool.js +++ b/js/tools/SelectionTool.js | |||
@@ -183,18 +183,21 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
183 | } | 183 | } |
184 | }, | 184 | }, |
185 | 185 | ||
186 | /** | ||
187 | * Double click handler | ||
188 | * | ||
189 | * Sets the currentSelectionContainer to the current selected element. If no elements are selected set the | ||
190 | * currentSelectionContainer to the userDocument div. | ||
191 | */ | ||
186 | HandleDoubleClick: { | 192 | HandleDoubleClick: { |
187 | value: function(event) { | 193 | value: function(event) { |
188 | 194 | if(this.application.ninja.selectedElements.length > 0) { | |
189 | // Temporary Code for Breadcrumb | 195 | this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]._element; |
190 | if(this.application.ninja.selectedElements.length > 0) { | 196 | } else { |
191 | this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]._element; | 197 | this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; |
192 | } else { | ||
193 | this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; | ||
194 | } | ||
195 | |||
196 | } | 198 | } |
197 | }, | 199 | } |
200 | }, | ||
198 | 201 | ||
199 | HandleKeyPress: { | 202 | HandleKeyPress: { |
200 | value: function(event){ | 203 | value: function(event){ |