diff options
author | Nivesh Rajbhandari | 2012-07-02 09:23:13 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-07-02 09:23:13 -0700 |
commit | 2bae1b3148233288ec0bc50876935bdfea1f288c (patch) | |
tree | 686fa3b5b9615941bb7013f35c91e8f326b049db /node_modules/montage-google/youtube-channel.reel/youtube-channel.js | |
parent | 2da05a4c71bfe9b136384d9e94fbfbef19f24550 (diff) | |
parent | 12de4e49a309e210c13eb40b2ffa158ef2eb54a7 (diff) | |
download | ninja-2bae1b3148233288ec0bc50876935bdfea1f288c.tar.gz |
Merge branch 'refs/heads/ninja-internal' into MaterialsUI
Diffstat (limited to 'node_modules/montage-google/youtube-channel.reel/youtube-channel.js')
-rw-r--r-- | node_modules/montage-google/youtube-channel.reel/youtube-channel.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/node_modules/montage-google/youtube-channel.reel/youtube-channel.js b/node_modules/montage-google/youtube-channel.reel/youtube-channel.js index ca08564b..f06216e1 100644 --- a/node_modules/montage-google/youtube-channel.reel/youtube-channel.js +++ b/node_modules/montage-google/youtube-channel.reel/youtube-channel.js | |||
@@ -124,6 +124,8 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { | |||
124 | 124 | ||
125 | draw: { | 125 | draw: { |
126 | value: function() { | 126 | value: function() { |
127 | var self = this; | ||
128 | |||
127 | if (this._script) { | 129 | if (this._script) { |
128 | if(this.element.childNodes.length < 1) { | 130 | if(this.element.childNodes.length < 1) { |
129 | this._savedReference.appendChild(this._script); | 131 | this._savedReference.appendChild(this._script); |
@@ -135,9 +137,9 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { | |||
135 | } | 137 | } |
136 | 138 | ||
137 | if (this._entries) { | 139 | if (this._entries) { |
138 | this.imageA.src = this._entries[0]["media$group"]["media$thumbnail"][0].url; | 140 | this.imageA.src = (this._entries[0]) ? this._entries[0]["media$group"]["media$thumbnail"][0].url : ""; |
139 | this.imageB.src = this._entries[1]["media$group"]["media$thumbnail"][0].url; | 141 | this.imageB.src = (this._entries[1]) ? this._entries[1]["media$group"]["media$thumbnail"][0].url : ""; |
140 | this.imageC.src = this._entries[2]["media$group"]["media$thumbnail"][0].url; | 142 | this.imageC.src = (this._entries[2]) ? this._entries[2]["media$group"]["media$thumbnail"][0].url : ""; |
141 | } | 143 | } |
142 | 144 | ||
143 | if (this._videoId) { | 145 | if (this._videoId) { |
@@ -145,8 +147,6 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { | |||
145 | this._videoId = null; | 147 | this._videoId = null; |
146 | } | 148 | } |
147 | 149 | ||
148 | var self = this; | ||
149 | |||
150 | if (this._shouldShowPopup) { | 150 | if (this._shouldShowPopup) { |
151 | this._positionPopup(); | 151 | this._positionPopup(); |
152 | 152 | ||
@@ -180,8 +180,12 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { | |||
180 | 180 | ||
181 | // take the video from the top only once it's stopped animating | 181 | // take the video from the top only once it's stopped animating |
182 | window.setTimeout(function() { | 182 | window.setTimeout(function() { |
183 | self.element.style.zIndex = null; | 183 | self._element.style.zIndex = null; |
184 | }, 500); | 184 | // HACK: Trigger a redraw so that Flash in Chrome on |
185 | // Windows doesn't remain rendered on top of everything, | ||
186 | // despite actually being hidden | ||
187 | self.player.element.getBoundingClientRect(); | ||
188 | }, 510); | ||
185 | } | 189 | } |
186 | 190 | ||
187 | } | 191 | } |
@@ -196,6 +200,7 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { | |||
196 | value: function() { | 200 | value: function() { |
197 | var doc = this._element.ownerDocument; | 201 | var doc = this._element.ownerDocument; |
198 | 202 | ||
203 | this._popupElement.style.width = doc.width + "px"; | ||
199 | this.player.width = doc.width; | 204 | this.player.width = doc.width; |
200 | this.player.height = doc.height; | 205 | this.player.height = doc.height; |
201 | 206 | ||