MCPcopy Create free account
hub / github.com/CoderOpen/waimai / createAnimationFrame

Function createAnimationFrame

front/components/u-charts/u-charts.js:4033–4048  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4031 var delay = 17;
4032
4033 function createAnimationFrame() {
4034 if (typeof setTimeout !== 'undefined') {
4035 return function(step, delay) {
4036 setTimeout(function() {
4037 var timeStamp = +new Date();
4038 step(timeStamp);
4039 }, delay);
4040 };
4041 } else if (typeof requestAnimationFrame !== 'undefined') {
4042 return requestAnimationFrame;
4043 } else {
4044 return function(step) {
4045 step(null);
4046 };
4047 }
4048 };
4049 var animationFrame = createAnimationFrame();
4050 var startTimeStamp = null;
4051 var _step = function step(timestamp) {

Callers 1

AnimationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected