aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/bindingTool.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js
index 6444d2a7..93af11c2 100644
--- a/js/tools/bindingTool.js
+++ b/js/tools/bindingTool.js
@@ -22,6 +22,7 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
22 }, 22 },
23 set: function(val) { 23 set: function(val) {
24 this._selectedComponent = val; 24 this._selectedComponent = val;
25 this.application.ninja.stage.bindingView.selectedComponent = val;
25 } 26 }
26 }, 27 },
27 28
@@ -32,19 +33,23 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
32 { 33 {
33 NJevent("enableStageMove"); 34 NJevent("enableStageMove");
34 this.application.ninja.workspaceMode = "binding"; 35 this.application.ninja.workspaceMode = "binding";
36 if (this.application.ninja.selectedElements.length !== 0 ) {
37 this.selectedComponent = this.application.ninja.selectedElements[0].controller;
38 }
35 } 39 }
36 else 40 else
37 { 41 {
38 NJevent("disableStageMove"); 42 NJevent("disableStageMove");
39 this.application.ninja.workspaceMode = "default"; 43 this.application.ninja.workspaceMode = "default";
44 this.selectedComponent = null;
40 } 45 }
46
41 } 47 }
42 }, 48 },
43 49
44 HandleLeftButtonDown: { 50 HandleLeftButtonDown: {
45 value: function(event) { 51 value: function(event) {
46 NJevent("enableStageMove"); 52 NJevent("enableStageMove");
47 this.application.ninja.stage.bindingView.validateOverHud();
48 } 53 }
49 }, 54 },
50 55
@@ -53,8 +58,8 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
53 /* 58 /*
54 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.
55 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.
56
57 */ 61 */
62 this.application.ninja.stage.bindingView.handleMousemove(event);
58 //this.doDraw(event); 63 //this.doDraw(event);
59 } 64 }
60 }, 65 },
@@ -79,7 +84,6 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
79 } else { 84 } else {
80 this.selectedComponent = null; 85 this.selectedComponent = null;
81 } 86 }
82 this.application.ninja.stage.bindingView.selectedComponent = this.selectedComponent;
83 this._isDrawing = false; 87 this._isDrawing = false;
84 } 88 }
85 //this.endDraw(event); 89 //this.endDraw(event);