aboutsummaryrefslogtreecommitdiffstats
path: root/src/animation/Runner.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2023-09-03 07:21:41 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2023-09-03 07:21:41 +0200
commitf5621f86417b0b57b742e71f1c167b046901888d (patch)
tree4d68b4bf1848c581d5f5a7ff993f9f8868cbdfe2 /src/animation/Runner.js
parent29b2bd7f811584380b35434d5bf29913ffe93459 (diff)
downloadsvg.js-f5621f86417b0b57b742e71f1c167b046901888d.tar.gz
svg.js-f5621f86417b0b57b742e71f1c167b046901888d.zip
allow 0 as animation duration and delay (fixes #1125)
Diffstat (limited to 'src/animation/Runner.js')
-rw-r--r--src/animation/Runner.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/animation/Runner.js b/src/animation/Runner.js
index a83a02f..4ad222f 100644
--- a/src/animation/Runner.js
+++ b/src/animation/Runner.js
@@ -72,18 +72,18 @@ export default class Runner extends EventTarget {
let times = 1
let swing = false
let wait = 0
- duration = duration || timeline.duration
- delay = delay || timeline.delay
+ duration = duration ?? timeline.duration
+ delay = delay ?? timeline.delay
when = when || 'last'
// If we have an object, unpack the values
if (typeof duration === 'object' && !(duration instanceof Stepper)) {
- delay = duration.delay || delay
- when = duration.when || when
+ delay = duration.delay ?? delay
+ when = duration.when ?? when
swing = duration.swing || swing
- times = duration.times || times
- wait = duration.wait || wait
- duration = duration.duration || timeline.duration
+ times = duration.times ?? times
+ wait = duration.wait ?? wait
+ duration = duration.duration ?? timeline.duration
}
return {