From 20ea3997661b068fc6628ffa573e1b2d47e3a800 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Tue, 19 Jun 2012 22:51:04 -0700 Subject: Binding View - Mouse Over Element Pop up Hud Signed-off-by: Armen Kesablyan --- js/tools/bindingTool.js | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'js/tools') 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, { In the mouse over event we need to validate if the mouse over is over a hud. If it on top of a hud bring that single hud to the top to associate with. */ + this.application.ninja.stage.bindingView.handleMousemove(event); //this.doDraw(event); } @@ -66,25 +67,26 @@ exports.BindingTool = Montage.create(ModifierToolBase, { HandleLeftButtonUp: { value: function(event) { + if(!this.application.ninja.stage.bindingView._isDrawingConnection) { + if(this._escape) { + this._escape = false; + return; + } - if(this._escape) { - this._escape = false; - return; - } - - if(this._hasDraw) { - this._hasDraw = false; - //this.endDraw(event); - } else { - this.doSelection(event); - if (this.application.ninja.selectedElements.length !== 0 ) { - if(this.application.ninja.selectedElements[0].controller) { - this.selectedComponent = this.application.ninja.selectedElements[0].controller; - } + if(this._hasDraw) { + this._hasDraw = false; + //this.endDraw(event); } else { - this.selectedComponent = null; + this.doSelection(event); + if (this.application.ninja.selectedElements.length !== 0 ) { + if(this.application.ninja.selectedElements[0].controller) { + this.selectedComponent = this.application.ninja.selectedElements[0].controller; + } + } else { + this.selectedComponent = null; + } + this._isDrawing = false; } - this._isDrawing = false; } //this.endDraw(event); //NJevent("disableStageMove"); -- cgit v1.2.3