aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-23 15:06:37 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-23 15:06:37 +0100
commit8555e13b252f07f8079b08c0b29f4399d389b1e0 (patch)
tree98dd44791b3a28a68ab11e90d1c2da7bc069ea21 /spec
parentd5c01a7848154d240f434b38d802fdb65727fd7f (diff)
downloadsvg.js-8555e13b252f07f8079b08c0b29f4399d389b1e0.tar.gz
svg.js-8555e13b252f07f8079b08c0b29f4399d389b1e0.zip
fixed lots of bugs in the timeline. Its now working as expected in all cases.
- refactor code into functions - handle timeSource correctly - allow for immediate updates - Runners dont know about their delay anymore. Thats far more simple. - Timeline is paused on creation
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/runner.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/spec/runner.js b/spec/spec/runner.js
index 0f231a3..ff9df7b 100644
--- a/spec/spec/runner.js
+++ b/spec/spec/runner.js
@@ -742,11 +742,11 @@ describe('SVG.Runner', function () {
var t = timeline.time()
expect(runner2.timeline()).toBe(timeline)
- expect(runner2.time()).toBe(-1000)
+ expect(runner2.time()).toBe(0)
- expect(timeline.schedule()).toEqual(jasmine.objectContaining([
+ expect(timeline.schedule()).toEqual(jasmine.arrayContaining([
jasmine.objectContaining({start: t, duration: 1000, end: t+1000, runner: runner}),
- jasmine.objectContaining({start: t+1000, duration: 500, end: t+1500, runner: runner2})
+ jasmine.objectContaining({start: t+2000, duration: 500, end: t+2500, runner: runner2})
]))
})
})