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 ++++-- .../montage-google/feed-reader/feed-entry.reel/feed-entry.html | 2 +- .../montage-google/feed-reader/feed-reader.reel/feed-reader.html | 2 +- node_modules/montage-google/map.reel/map.html | 2 +- .../montage-google/picasa-carousel.reel/picasa-carousel.html | 4 ++-- .../montage-google/youtube-channel.reel/youtube-channel.html | 4 ++-- node_modules/montage-google/youtube-player.reel/youtube-player.html | 2 +- 7 files changed, 12 insertions(+), 10 deletions(-) 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); }) diff --git a/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html b/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html index b8b9f39a..332b2932 100644 --- a/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html +++ b/node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html @@ -45,7 +45,7 @@ } }, "owner": { - "prototype": "montage-google/feed-reader/feed-entry.reel", + "prototype": "feed-reader/feed-entry.reel", "properties": { "element": {"#": "feed-entry"} } diff --git a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.html b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.html index 99a353b9..fd4b00a1 100644 --- a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.html +++ b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.html @@ -38,7 +38,7 @@ }, "owner": { - "prototype": "montage-google/feed-reader/feed-reader.reel", + "prototype": "feed-reader/feed-reader.reel", "properties": { "element": {"#": "feed-reader"} } diff --git a/node_modules/montage-google/map.reel/map.html b/node_modules/montage-google/map.reel/map.html index fee3a38e..bd41f47e 100644 --- a/node_modules/montage-google/map.reel/map.html +++ b/node_modules/montage-google/map.reel/map.html @@ -15,7 +15,7 @@ { "owner": { - "prototype": "montage-google/map.reel", + "prototype": "map.reel", "properties": { "element": {"#": "map-container"}, "mapEl": {"#": "map"} diff --git a/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.html b/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.html index f7c8a766..dc70a19c 100755 --- a/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.html +++ b/node_modules/montage-google/picasa-carousel.reel/picasa-carousel.html @@ -12,7 +12,7 @@