aboutsummaryrefslogtreecommitdiff
path: root/js/tools/bindingTool.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-28 18:00:07 -0700
committerValerio Virgillito2012-06-28 18:00:07 -0700
commit54f68d3635941489e34e53d9925c3659b3eeabbf (patch)
tree26cda6bb6f8a7f2af80a2bcf405b379f37d7600a /js/tools/bindingTool.js
parentb4b54f6cc084b3f7483ebed1e15c1b4770949d58 (diff)
parentcd563af62e937f49406caca55549cd72b13ee228 (diff)
downloadninja-54f68d3635941489e34e53d9925c3659b3eeabbf.tar.gz
Merge pull request #355 from dhg637/GIO_binding-view
Gio binding view bugs and fixes
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 }