aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-20 23:03:48 -0800
committerValerio Virgillito2012-02-20 23:03:48 -0800
commitf9d34a54baf61ccdf77732b1aaedb29d296b8c2e (patch)
tree52821ec87e002b8a704a1355ce70ac65872c5568 /js/tools
parent9e566515f7e3a4ae26b39a2581008a15cf662c95 (diff)
downloadninja-f9d34a54baf61ccdf77732b1aaedb29d296b8c2e.tar.gz
enabling nested selection
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/SelectionTool.js23
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){