Have AnimationGroup initialize its runtime before begin is called. This way it can be composed

This commit is contained in:
Grant Sanderson
2019-09-30 12:06:17 -07:00
parent 4eb6c6fb5b
commit c94aef8845

View File

@ -33,6 +33,7 @@ class AnimationGroup(Animation):
self.group = Group(*remove_list_redundancies(
[anim.mobject for anim in animations]
))
self.init_run_time()
Animation.__init__(self, self.group, **kwargs)
def get_all_mobjects(self):
@ -41,7 +42,7 @@ class AnimationGroup(Animation):
def begin(self):
for anim in self.animations:
anim.begin()
self.init_run_time()
# self.init_run_time()
def finish(self):
for anim in self.animations: