mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 17:29:06 +08:00
Mobject should update when an updater is added (by default at least)
This commit is contained in:
@ -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:
|
||||||
|
Reference in New Issue
Block a user