diff options
author | Armen Kesablyan | 2012-06-23 13:58:16 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-23 13:58:16 -0700 |
commit | 24c6741d594b9d4167cd4de407a625eb43ebe7cc (patch) | |
tree | 7781f7a12abb0484363a805c44d1a52046b35d37 /js/stage | |
parent | 3c9d7334cac82f66adbdb2cce55a73c4c51ae413 (diff) | |
download | ninja-24c6741d594b9d4167cd4de407a625eb43ebe7cc.tar.gz |
Binding View: Fixed If Selected Div Erroring Out
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/binding-view.reel/binding-view.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js index c2407b13..1fc4d583 100755 --- a/js/stage/binding-view.reel/binding-view.js +++ b/js/stage/binding-view.reel/binding-view.js | |||
@@ -109,7 +109,9 @@ exports.BindingView = Montage.create(Component, { | |||
109 | this._selectedComponent = val; | 109 | this._selectedComponent = val; |
110 | if(this._selectedComponent !== null) { | 110 | if(this._selectedComponent !== null) { |
111 | this.application.ninja.objectsController.currentObject = this.selectedComponent; | 111 | this.application.ninja.objectsController.currentObject = this.selectedComponent; |
112 | this.boundComponents.push(this.selectedComponent); | 112 | if (this.selectedComponent !== null) { |
113 | this.boundComponents.push(this.selectedComponent); | ||
114 | } | ||
113 | } | 115 | } |
114 | this.needsDraw = true; | 116 | this.needsDraw = true; |
115 | } | 117 | } |
@@ -217,7 +219,7 @@ exports.BindingView = Montage.create(Component, { | |||
217 | this.element.style.removeProperty('display'); | 219 | this.element.style.removeProperty('display'); |
218 | this.element.style.width = this.width + "px"; | 220 | this.element.style.width = this.width + "px"; |
219 | this.element.style.height = this.height + "px"; | 221 | this.element.style.height = this.height + "px"; |
220 | if(this.selectedComponent !== null) { | 222 | if(this.selectedComponent !== null && typeof(this.selectedComponent) !== "undefined") { |
221 | this.canvas.width = this.application.ninja.stage.drawingCanvas.offsetWidth; | 223 | this.canvas.width = this.application.ninja.stage.drawingCanvas.offsetWidth; |
222 | this.canvas.height = this.application.ninja.stage.drawingCanvas.offsetHeight; | 224 | this.canvas.height = this.application.ninja.stage.drawingCanvas.offsetHeight; |
223 | this.clearCanvas(); | 225 | this.clearCanvas(); |