Skip to content

Commit 1eda622

Browse files
committed
Moved the raf after the callback.
1 parent 960acce commit 1eda622

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

v3/src/dom/RequestAnimationFrame.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ var RequestAnimationFrame = function ()
4242
{
4343
_this.tick = timestamp;
4444

45-
_this.timeOutID = window.requestAnimationFrame(step);
46-
4745
_this.callback(timestamp);
46+
47+
_this.timeOutID = window.requestAnimationFrame(step);
4848
};
4949

5050
var stepTimeout = function ()
@@ -53,9 +53,9 @@ var RequestAnimationFrame = function ()
5353

5454
_this.tick = d;
5555

56-
_this.timeOutID = window.setTimeout(stepTimeout, _this.timeToCall);
57-
5856
_this.callback(d);
57+
58+
_this.timeOutID = window.setTimeout(stepTimeout, _this.timeToCall);
5959
};
6060

6161
this.step = step;

0 commit comments

Comments
 (0)