aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorArmen Kesablyan2012-05-16 18:25:03 -0700
committerArmen Kesablyan2012-05-16 18:25:03 -0700
commitd48f086ad64badf07b5f82bf6e0216074eac7a25 (patch)
tree93dc25940e754297cd6bad9f6b1e93be7182659b /js/tools
parentc8d61c8e72e0eba266575f9df54325fa77fde73d (diff)
downloadninja-d48f086ad64badf07b5f82bf6e0216074eac7a25.tar.gz
Initial Binding Hud
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/bindingTool.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js
index 1a8cb47f..5953c409 100644
--- a/js/tools/bindingTool.js
+++ b/js/tools/bindingTool.js
@@ -7,6 +7,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8 DrawingTool = require("js/tools/drawing-tool").DrawingTool, 8 DrawingTool = require("js/tools/drawing-tool").DrawingTool,
9ModifierToolBase = require("js/tools/modifier-tool-base").ModifierToolBase; 9ModifierToolBase = require("js/tools/modifier-tool-base").ModifierToolBase;
10SelectionTool = require("js/tools/SelectionTool").SelectionTool;
10 11
11 12
12exports.BindingTool = Montage.create(ModifierToolBase, { 13exports.BindingTool = Montage.create(ModifierToolBase, {
@@ -44,8 +45,24 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
44 45
45 HandleLeftButtonUp: { 46 HandleLeftButtonUp: {
46 value: function(event) { 47 value: function(event) {
47 this.endDraw(event); 48
48 NJevent("disableStageMove"); 49 if(this._escape) {
50 this._escape = false;
51 return;
52 }
53
54 if(this._hasDraw) {
55 this._hasDraw = false;
56 this.endDraw(event);
57 } else {
58 this.doSelection(event);
59 if (this.application.ninja.selectedElements.length !== 0 ) {
60 this.selectedElement = this.application.ninja.selectedElements[0];
61 }
62 this._isDrawing = false;
63 }
64 //this.endDraw(event);
65 //NJevent("disableStageMove");
49 } 66 }
50 } 67 }
51}); \ No newline at end of file 68}); \ No newline at end of file