summaryrefslogtreecommitdiffstats
path: root/src/animation
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-12 23:09:25 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-28 13:42:25 +0100
commit675847a99f1640c87df0a6187eeb34b90d903666 (patch)
tree78483c739c2b164cd6b098d952658d636e3be745 /src/animation
parentfa0461eeddf65a249e1a674305684ae756a69965 (diff)
downloadsvg.js-675847a99f1640c87df0a6187eeb34b90d903666.tar.gz
svg.js-675847a99f1640c87df0a6187eeb34b90d903666.zip
plumber differences between node and browser so that tests run on both
Diffstat (limited to 'src/animation')
-rw-r--r--src/animation/Animator.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/animation/Animator.js b/src/animation/Animator.js
index 1392daa..0119cba 100644
--- a/src/animation/Animator.js
+++ b/src/animation/Animator.js
@@ -5,7 +5,7 @@ const Animator = {
nextDraw: null,
frames: new Queue(),
timeouts: new Queue(),
- timer: globals.window.performance || globals.window.Date,
+ timer: () => globals.window.performance || globals.window.Date,
transforms: [],
frame (fn) {
@@ -29,7 +29,7 @@ const Animator = {
delay = delay || 0
// Work out when the event should fire
- var time = Animator.timer.now() + delay
+ var time = Animator.timer().now() + delay
// Add the timeout to the end of the queue
var node = Animator.timeouts.push({ run: fn, time: time })