aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-29 11:50:17 -0700
committerNivesh Rajbhandari2012-06-29 11:50:17 -0700
commit81d75ac08ff24dc3078d79a9133e54f592c23026 (patch)
tree4f4136503c87a72f7af67a54dad69c14469ee01e /js/tools
parent01783536d2245b474eb1f89df673bfabb006cbdd (diff)
parentecd9e3b3b09695e3e7115c04e75add5a20c5c6fe (diff)
downloadninja-81d75ac08ff24dc3078d79a9133e54f592c23026.tar.gz
Merge branch 'refs/heads/ninja-internal' into ColorGradientFix
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/bindingTool.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js
index 1e1c9e5b..3704a451 100644
--- a/js/tools/bindingTool.js
+++ b/js/tools/bindingTool.js
@@ -12,17 +12,17 @@ SelectionTool = require("js/tools/SelectionTool").SelectionTool;
12 12
13exports.BindingTool = Montage.create(ModifierToolBase, { 13exports.BindingTool = Montage.create(ModifierToolBase, {
14 drawingFeedback: { value: { mode: "Draw2D", type: "" } }, 14 drawingFeedback: { value: { mode: "Draw2D", type: "" } },
15 _selectedComponent: { 15 _selectedElement: {
16 value: null 16 value: null
17 }, 17 },
18 18
19 selectedComponent: { 19 selectedElement: {
20 get:function() { 20 get:function() {
21 return this._selectedComponent; 21 return this._selectedElement;
22 }, 22 },
23 set: function(val) { 23 set: function(val) {
24 this._selectedComponent = val; 24 this._selectedElement = val;
25 this.application.ninja.stage.bindingView.selectedComponent = val; 25 this.application.ninja.stage.bindingView.selectedElement = val;
26 } 26 }
27 }, 27 },
28 28
@@ -33,9 +33,10 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
33 { 33 {
34 NJevent("enableStageMove"); 34 NJevent("enableStageMove");
35 this.application.ninja.workspaceMode = "binding"; 35 this.application.ninja.workspaceMode = "binding";
36 this.application.ninja.stage.bindingView.hide = false;
36 if (this.application.ninja.selectedElements.length !== 0 ) { 37 if (this.application.ninja.selectedElements.length !== 0 ) {
37 if(typeof(this.application.ninja.selectedElements[0].controller) !== "undefined") { 38 if(typeof(this.application.ninja.selectedElements[0].controller) !== "undefined") {
38 this.selectedComponent = this.application.ninja.selectedElements[0].controller; 39 this.selectedElement = this.application.ninja.selectedElements[0];
39 } else { 40 } else {
40 this.selectedComponent = null; 41 this.selectedComponent = null;
41 } 42 }
@@ -47,6 +48,7 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
47 NJevent("disableStageMove"); 48 NJevent("disableStageMove");
48 this.application.ninja.workspaceMode = "default"; 49 this.application.ninja.workspaceMode = "default";
49 this.selectedComponent = null; 50 this.selectedComponent = null;
51 this.application.ninja.stage.bindingView.hide = true;
50 } 52 }
51 53
52 } 54 }
@@ -85,12 +87,12 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
85 this.doSelection(event); 87 this.doSelection(event);
86 if (this.application.ninja.selectedElements.length !== 0 ) { 88 if (this.application.ninja.selectedElements.length !== 0 ) {
87 if(this.application.ninja.selectedElements[0].controller) { 89 if(this.application.ninja.selectedElements[0].controller) {
88 this.selectedComponent = this.application.ninja.selectedElements[0].controller; 90 this.selectedElement = this.application.ninja.selectedElements[0];
89 } else { 91 } else {
90 this.selectedComponent = null; 92 this.selectedElement = null;
91 } 93 }
92 } else { 94 } else {
93 this.selectedComponent = null; 95 this.selectedElement = null;
94 } 96 }
95 this._isDrawing = false; 97 this._isDrawing = false;
96 } 98 }