aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/bindingTool.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js
index b284fc47..1e1c9e5b 100644
--- a/js/tools/bindingTool.js
+++ b/js/tools/bindingTool.js
@@ -34,7 +34,12 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
34 NJevent("enableStageMove"); 34 NJevent("enableStageMove");
35 this.application.ninja.workspaceMode = "binding"; 35 this.application.ninja.workspaceMode = "binding";
36 if (this.application.ninja.selectedElements.length !== 0 ) { 36 if (this.application.ninja.selectedElements.length !== 0 ) {
37 this.selectedComponent = this.application.ninja.selectedElements[0].controller; 37 if(typeof(this.application.ninja.selectedElements[0].controller) !== "undefined") {
38 this.selectedComponent = this.application.ninja.selectedElements[0].controller;
39 } else {
40 this.selectedComponent = null;
41 }
42
38 } 43 }
39 } 44 }
40 else 45 else
@@ -81,6 +86,8 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
81 if (this.application.ninja.selectedElements.length !== 0 ) { 86 if (this.application.ninja.selectedElements.length !== 0 ) {
82 if(this.application.ninja.selectedElements[0].controller) { 87 if(this.application.ninja.selectedElements[0].controller) {
83 this.selectedComponent = this.application.ninja.selectedElements[0].controller; 88 this.selectedComponent = this.application.ninja.selectedElements[0].controller;
89 } else {
90 this.selectedComponent = null;
84 } 91 }
85 } else { 92 } else {
86 this.selectedComponent = null; 93 this.selectedComponent = null;