Bug fix to Succession; it wasn't initializing runtimes

This commit is contained in:
Grant Sanderson 2019-02-09 11:54:00 -08:00
parent 67a33d2e88
commit 9180a687f9

View file

@ -21,10 +21,13 @@ class AnimationGroup(Animation):
# If >0 and <1, they start at lagged times
# from one and other.
"lag_ratio": 0,
"group": None,
}
def __init__(self, *animations, **kwargs):
digest_config(self, kwargs)
self.animations = animations
if self.group is None:
self.group = Group(*remove_list_redundancies(
[anim.mobject for anim in animations]
))
@ -34,9 +37,9 @@ class AnimationGroup(Animation):
return self.group
def begin(self):
self.init_run_time()
for anim in self.animations:
anim.begin()
self.init_run_time()
def finish(self):
for anim in self.animations:
@ -106,6 +109,7 @@ class Succession(AnimationGroup):
def begin(self):
assert(len(self.animations) > 0)
self.init_run_time()
self.active_animation = self.animations[0]
self.active_animation.begin()