From 0243eed41eddd5bde3a7ce0c6e2ae7313457b19b Mon Sep 17 00:00:00 2001 From: Stuart Knightley Date: Wed, 21 Mar 2012 14:27:43 -0700 Subject: Add scale animation back to youtube channel Masks animation error on Canary. Also looks cool. --- .../montage/ui/youtube-channel.reel/youtube-channel.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'node_modules/montage/ui/youtube-channel.reel/youtube-channel.js') diff --git a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js b/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js index 6cd43a3c..30920953 100644 --- a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js +++ b/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js @@ -136,8 +136,15 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { if (this._shouldShowPopup) { this._positionPopup(); - this._element.classList.add("show"); - this._popupElement.classList.add("show"); + + // Fix for Canary where the thumbnail in the video doesn't + // change until the CSS transition has finished, so wait for + // it to change before starting the animation + var self = this; + window.setTimeout(function() { + self._element.classList.add("show"); + self._popupElement.classList.add("show"); + }, 50); if (window.Touch) { document.addEventListener('touchstart', this, false); } else { -- cgit v1.2.3