diff options
author | Armen Kesablyan | 2012-05-16 18:25:03 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-05-16 18:25:03 -0700 |
commit | d48f086ad64badf07b5f82bf6e0216074eac7a25 (patch) | |
tree | 93dc25940e754297cd6bad9f6b1e93be7182659b /js/tools | |
parent | c8d61c8e72e0eba266575f9df54325fa77fde73d (diff) | |
download | ninja-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.js | 21 |
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 | |||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | DrawingTool = require("js/tools/drawing-tool").DrawingTool, | 8 | DrawingTool = require("js/tools/drawing-tool").DrawingTool, |
9 | ModifierToolBase = require("js/tools/modifier-tool-base").ModifierToolBase; | 9 | ModifierToolBase = require("js/tools/modifier-tool-base").ModifierToolBase; |
10 | SelectionTool = require("js/tools/SelectionTool").SelectionTool; | ||
10 | 11 | ||
11 | 12 | ||
12 | exports.BindingTool = Montage.create(ModifierToolBase, { | 13 | exports.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 |