Skip to content

Instantly share code, notes, and snippets.

@denisnazarov
Created November 14, 2013 23:48
Show Gist options
  • Save denisnazarov/7476523 to your computer and use it in GitHub Desktop.
Save denisnazarov/7476523 to your computer and use it in GitHub Desktop.
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