aboutsummaryrefslogtreecommitdiff
path: root/js/tools/bindingTool.js
diff options
context:
space:
mode:
authorhwc4872012-06-29 13:01:02 -0700
committerhwc4872012-06-29 13:01:02 -0700
commit44eba9c1f7935ae13e87a6dcf6ddea0efa63eb05 (patch)
tree77ec7650cbc397c1792254529b0430cd691fad08 /js/tools/bindingTool.js
parent230b3d0fdfd29e998b82fef9f1ff5d2ca7ef8596 (diff)
parentecd9e3b3b09695e3e7115c04e75add5a20c5c6fe (diff)
downloadninja-44eba9c1f7935ae13e87a6dcf6ddea0efa63eb05.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Taper
Diffstat (limited to 'js/tools/bindingTool.js')
-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 }