From 4330f78ed6aeb5495f066bc949987d86996186c6 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Thu, 29 Dec 2022 10:44:52 -0800 Subject: [PATCH] Enable lag_ratio for TransformMatchingStrings --- manimlib/animation/transform_matching_parts.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/manimlib/animation/transform_matching_parts.py b/manimlib/animation/transform_matching_parts.py index de32bf89..3bd369d8 100644 --- a/manimlib/animation/transform_matching_parts.py +++ b/manimlib/animation/transform_matching_parts.py @@ -151,13 +151,14 @@ class TransformMatchingStrings(AnimationGroup): match_animation: type = Transform, mismatch_animation: type = Transform, run_time=2, + lag_ratio=0, **kwargs, ): self.source = source self.target = target matched_keys = matched_keys or list() key_map = key_map or dict() - self.anim_config = dict(run_time=run_time, **kwargs) + self.anim_config = dict(**kwargs) # We will progressively build up a list of transforms # from characters in source to those in target. These @@ -208,7 +209,11 @@ class TransformMatchingStrings(AnimationGroup): target_char, source.get_center(), **self.anim_config )) - super().__init__(*self.anims) + super().__init__( + *self.anims, + run_time=run_time, + lag_ratio=lag_ratio, + ) def add_transform( self,