Fixed #99 with requestAnimationFrame polyfill

This commit is contained in:
Max Lynch
2013-11-07 19:24:55 -06:00
parent d37ec6fca2
commit 32d0f48e21
9 changed files with 71 additions and 41 deletions

16
js/utils/poly.js Normal file
View File

@ -0,0 +1,16 @@
(function(ionic) {
'use strict';
// From the man himself, Mr. Paul Irish.
// The requestAnimationFrame polyfill
window.rAF = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function( callback ){
window.setTimeout(callback, 1000 / 60);
};
})();
})(window.ionic);