File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 26
26
} ;
27
27
} ) ( ) ;
28
28
29
- var vendors = [ 'webkit' , 'moz' ] ;
30
- for ( var x = 0 ; x < vendors . length && ! window . requestAnimationFrame ; ++ x ) {
31
- window . requestAnimationFrame = window [ vendors [ x ] + 'RequestAnimationFrame' ] ;
32
- window . cancelAnimationFrame =
33
- window [ vendors [ x ] + 'CancelAnimationFrame' ] || window [ vendors [ x ] + 'CancelRequestAnimationFrame' ] ;
34
- }
35
- window . cancelAnimationFrame =
36
- window [ vendors [ x ] + 'CancelAnimationFrame' ] || window [ vendors [ x ] + 'CancelRequestAnimationFrame' ] ;
29
+ var cancelAnimationFrame = window . cancelAnimationFrame ||
30
+ window . webkitCancelAnimationFrame ||
31
+ window . mozCancelAnimationFrame ||
32
+ window . webkitCancelRequestAnimationFrame ;
33
+
34
+ window . requestAnimationFrame = window . _rAF ;
35
+ window . cancelAnimationFrame = cancelAnimationFrame ;
37
36
38
37
/**
39
38
* @ngdoc utility
You can’t perform that action at this time.
0 commit comments