mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Mobject should update when an updater is added (by default at least)
This commit is contained in:
parent
9960ae177c
commit
b42e772563
1 changed files with 4 additions and 1 deletions
|
@ -170,8 +170,11 @@ class Mobject(Container):
|
||||||
def get_updaters(self):
|
def get_updaters(self):
|
||||||
return self.updaters
|
return self.updaters
|
||||||
|
|
||||||
def add_updater(self, update_function):
|
def add_updater(self, update_function, call_updater=True):
|
||||||
self.updaters.append(update_function)
|
self.updaters.append(update_function)
|
||||||
|
if call_updater:
|
||||||
|
self.update(0)
|
||||||
|
return self
|
||||||
|
|
||||||
def remove_updater(self, update_function):
|
def remove_updater(self, update_function):
|
||||||
while update_function in self.updaters:
|
while update_function in self.updaters:
|
||||||
|
|
Loading…
Add table
Reference in a new issue