diff options
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(); |