mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Fix Restore
This commit is contained in:
parent
764dec20eb
commit
b94e9f3a24
1 changed files with 4 additions and 2 deletions
|
@ -274,9 +274,11 @@ class ShrinkToCenter(ScaleInPlace):
|
|||
super().__init__(mobject, 0, **kwargs)
|
||||
|
||||
|
||||
class Restore(ApplyMethod):
|
||||
class Restore(Transform):
|
||||
def __init__(self, mobject: Mobject, **kwargs):
|
||||
super().__init__(mobject.restore, **kwargs)
|
||||
if not hasattr(mobject, "saved_state") or mobject.saved_state is None:
|
||||
raise Exception("Trying to restore without having saved")
|
||||
super().__init__(mobject, mobject.saved_state, **kwargs)
|
||||
|
||||
|
||||
class ApplyFunction(Transform):
|
||||
|
|
Loading…
Add table
Reference in a new issue