summaryrefslogtreecommitdiffstats
path: root/src/animation
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-11 17:37:06 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-11 17:37:06 +0100
commitbf7703f5915c6154937f3febf812aad6483bff45 (patch)
tree384be2f9fff05e755669b14f2f8fa0a624dacf45 /src/animation
parentf2513baf3c9262190ee2c92fb98b2dd099bfbab2 (diff)
downloadsvg.js-bf7703f5915c6154937f3febf812aad6483bff45.tar.gz
svg.js-bf7703f5915c6154937f3febf812aad6483bff45.zip
make window and document exchangeable in case they are not globals alreay, make sure that init functions are chaninable
Diffstat (limited to 'src/animation')
-rw-r--r--src/animation/Animator.js3
-rw-r--r--src/animation/Timeline.js2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/animation/Animator.js b/src/animation/Animator.js
index fdb2326..4e0b112 100644
--- a/src/animation/Animator.js
+++ b/src/animation/Animator.js
@@ -1,5 +1,8 @@
+import globals from '../utils/window.js'
import Queue from './Queue.js'
+const { window } = globals
+
const Animator = {
nextDraw: null,
frames: new Queue(),
diff --git a/src/animation/Timeline.js b/src/animation/Timeline.js
index 790033a..ff30a0d 100644
--- a/src/animation/Timeline.js
+++ b/src/animation/Timeline.js
@@ -1,6 +1,8 @@
import { registerMethods } from '../utils/methods.js'
import Animator from './Animator.js'
+import globals from '../utils/window.js'
+const { window, document } = globals
var time = window.performance || Date
var makeSchedule = function (runnerInfo) {