From ac3ceb7b38482d81c58a4ea12291a4559b87fa3d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 11:49:28 -0700 Subject: fix for the the components not rendering and not selecting Signed-off-by: Valerio Virgillito --- js/document/templates/app/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/document/templates/app/main.js b/js/document/templates/app/main.js index 0cdf718c..8dc05ba5 100644 --- a/js/document/templates/app/main.js +++ b/js/document/templates/app/main.js @@ -61,13 +61,15 @@ exports.Main = Montage.create(Component, { var componentRequire = component[data.name]; var componentInstance = componentRequire.create(); - componentInstance.element = element; + componentInstance.addEventListener("firstDraw", self, false); + + componentInstance.element = element; componentInstance.needsDraw = true; componentInstance.ownerComponent = self; self.componentToInsert = componentInstance; - componentInstance.addEventListener("firstDraw", self, false); + callback(componentInstance, element); }) -- cgit v1.2.3