aboutsummaryrefslogtreecommitdiff
path: root/js/tools/bindingTool.js
diff options
context:
space:
mode:
authorEric Guzman2012-06-19 22:52:30 -0700
committerEric Guzman2012-06-19 22:52:30 -0700
commit4bce228aa425fc9b6b9db59518275d248405ed9e (patch)
tree9800812de9faa47a22b3a44a515fbe8d60d532de /js/tools/bindingTool.js
parent72efb92273d20757097b18326fb31d070a6d693d (diff)
parent20ea3997661b068fc6628ffa573e1b2d47e3a800 (diff)
downloadninja-4bce228aa425fc9b6b9db59518275d248405ed9e.tar.gz
Merge branch 'binding' of github.com:dhg637/ninja-internal into binding
Diffstat (limited to 'js/tools/bindingTool.js')
-rw-r--r--js/tools/bindingTool.js34
1 files changed, 18 insertions, 16 deletions
diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js
index 93af11c2..b284fc47 100644
--- a/js/tools/bindingTool.js
+++ b/js/tools/bindingTool.js
@@ -59,6 +59,7 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
59 In the mouse over event we need to validate if the mouse over is over a hud. 59 In the mouse over event we need to validate if the mouse over is over a hud.
60 If it on top of a hud bring that single hud to the top to associate with. 60 If it on top of a hud bring that single hud to the top to associate with.
61 */ 61 */
62
62 this.application.ninja.stage.bindingView.handleMousemove(event); 63 this.application.ninja.stage.bindingView.handleMousemove(event);
63 //this.doDraw(event); 64 //this.doDraw(event);
64 } 65 }
@@ -66,25 +67,26 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
66 67
67 HandleLeftButtonUp: { 68 HandleLeftButtonUp: {
68 value: function(event) { 69 value: function(event) {
70 if(!this.application.ninja.stage.bindingView._isDrawingConnection) {
71 if(this._escape) {
72 this._escape = false;
73 return;
74 }
69 75
70 if(this._escape) { 76 if(this._hasDraw) {
71 this._escape = false; 77 this._hasDraw = false;
72 return; 78 //this.endDraw(event);
73 }
74
75 if(this._hasDraw) {
76 this._hasDraw = false;
77 //this.endDraw(event);
78 } else {
79 this.doSelection(event);
80 if (this.application.ninja.selectedElements.length !== 0 ) {
81 if(this.application.ninja.selectedElements[0].controller) {
82 this.selectedComponent = this.application.ninja.selectedElements[0].controller;
83 }
84 } else { 79 } else {
85 this.selectedComponent = null; 80 this.doSelection(event);
81 if (this.application.ninja.selectedElements.length !== 0 ) {
82 if(this.application.ninja.selectedElements[0].controller) {
83 this.selectedComponent = this.application.ninja.selectedElements[0].controller;
84 }
85 } else {
86 this.selectedComponent = null;
87 }
88 this._isDrawing = false;
86 } 89 }
87 this._isDrawing = false;
88 } 90 }
89 //this.endDraw(event); 91 //this.endDraw(event);
90 //NJevent("disableStageMove"); 92 //NJevent("disableStageMove");