aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-23 13:58:16 -0700
committerArmen Kesablyan2012-06-23 13:58:16 -0700
commit24c6741d594b9d4167cd4de407a625eb43ebe7cc (patch)
tree7781f7a12abb0484363a805c44d1a52046b35d37 /js/tools
parent3c9d7334cac82f66adbdb2cce55a73c4c51ae413 (diff)
downloadninja-24c6741d594b9d4167cd4de407a625eb43ebe7cc.tar.gz
Binding View: Fixed If Selected Div Erroring Out
Signed-off-by: Armen Kesablyan <armen@motorola.com>
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;