From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- js/tools/SelectionTool.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 js/tools/SelectionTool.js (limited to 'js/tools/SelectionTool.js') diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js old mode 100644 new mode 100755 -- cgit v1.2.3 From 31781742ad40854a48ede88cf3c7a6d700b35cbb Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 20 Feb 2012 15:35:09 -0800 Subject: formatting cleanup Signed-off-by: Valerio Virgillito --- js/tools/SelectionTool.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'js/tools/SelectionTool.js') diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js index 48548271..f76a6d85 100755 --- a/js/tools/SelectionTool.js +++ b/js/tools/SelectionTool.js @@ -115,8 +115,7 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { HandleLeftButtonUp: { value: function(event) { var selectedItems, - point = webkitConvertPointFromPageToNode(this.application.ninja.stage.canvas, - new WebKitPoint(event.pageX, event.pageY)); + point = webkitConvertPointFromPageToNode(this.application.ninja.stage.canvas, new WebKitPoint(event.pageX, event.pageY)); this.isDrawing = false; this.application.ninja.stage.showSelectionBounds = true; @@ -186,21 +185,11 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { HandleDoubleClick: { value: function(event) { - /* - var selectedObject = stageManagerModule.stageManager.GetObjectFromPoint(event.layerX, event.layerY, this._canOperateOnStage); - - if(selectedObject) { - if(selectionManagerModule.selectionManager.findSelectedElement(selectedObject) === -1) { - selectionManagerModule.selectionManager.setSingleSelection(selectedObject); - } - } - */ // Temporary Code for Breadcrumb if(this.application.ninja.selectedElements.length > 0) { this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]._element; } else { - console.log(this.application.ninja.currentDocument.documentRoot.uuid); this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; } -- cgit v1.2.3 From f9d34a54baf61ccdf77732b1aaedb29d296b8c2e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 20 Feb 2012 23:03:48 -0800 Subject: enabling nested selection Signed-off-by: Valerio Virgillito --- js/tools/SelectionTool.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'js/tools/SelectionTool.js') 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, { } }, + /** + * Double click handler + * + * Sets the currentSelectionContainer to the current selected element. If no elements are selected set the + * currentSelectionContainer to the userDocument div. + */ HandleDoubleClick: { - value: function(event) { - - // Temporary Code for Breadcrumb - if(this.application.ninja.selectedElements.length > 0) { - this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]._element; - } else { - this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; - } - + value: function(event) { + if(this.application.ninja.selectedElements.length > 0) { + this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]._element; + } else { + this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; } - }, + } + }, HandleKeyPress: { value: function(event){ -- cgit v1.2.3