Only call become at the end of Transform if the rate func ends at 1

This commit is contained in:
Grant Sanderson 2023-01-31 14:46:28 -08:00
parent 1e46847a69
commit 7e78e76966

View file

@ -70,7 +70,7 @@ class Transform(Animation):
def finish(self) -> None:
super().finish()
self.mobject.unlock_data()
if self.target_mobject is not None:
if self.target_mobject is not None and self.rate_func(1) == 1:
self.mobject.become(self.target_mobject)
def create_target(self) -> Mobject: