mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Merge pull request #1430 from malixsys/patch-4
fix(rAF): fixing requestAnimationFrame & cancelAnimationFrame
This commit is contained in:
@@ -26,14 +26,13 @@
|
||||
};
|
||||
})();
|
||||
|
||||
var vendors = ['webkit', 'moz'];
|
||||
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
||||
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
|
||||
window.cancelAnimationFrame =
|
||||
window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
|
||||
}
|
||||
window.cancelAnimationFrame =
|
||||
window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
|
||||
var cancelAnimationFrame = window.cancelAnimationFrame ||
|
||||
window.webkitCancelAnimationFrame ||
|
||||
window.mozCancelAnimationFrame ||
|
||||
window.webkitCancelRequestAnimationFrame;
|
||||
|
||||
window.requestAnimationFrame = window._rAF;
|
||||
window.cancelAnimationFrame = cancelAnimationFrame;
|
||||
|
||||
/**
|
||||
* @ngdoc utility
|
||||
|
||||
Reference in New Issue
Block a user