Created
November 14, 2013 23:48
-
-
Save denisnazarov/7476523 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fade: (opacity, callback) -> | 10 if (url === this.get('currentView.src')){ | |
11 currentOpacity = @$().css('opacity') | 11 this.get('controller.videoPromise').resolve(); | |
12 return callback() if currentOpacity == opacity | 12 return; | |
13 | 13 } | |
14 @$().css('opacity', opacity) | 14 | |
15 Ember.run => | 15 var view = viewToFade.create({ | |
16 @$().on('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', >| 16 src: url, | |
17 @$().off('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd>| 17 }); | |
18 callback() | 18 | |
19 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment