mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Change name note_updated_family -> note_changed_family
This commit is contained in:
parent
4b14c11e4b
commit
fd35433a62
1 changed files with 9 additions and 9 deletions
|
@ -409,13 +409,13 @@ class Mobject(object):
|
||||||
return self.submobjects
|
return self.submobjects
|
||||||
|
|
||||||
@affects_data
|
@affects_data
|
||||||
def note_updated_family(self, only_changed_order=False) -> Self:
|
def note_changed_family(self, only_changed_order=False) -> Self:
|
||||||
self.family = None
|
self.family = None
|
||||||
if not only_changed_order:
|
if not only_changed_order:
|
||||||
self.refresh_has_updater_status()
|
self.refresh_has_updater_status()
|
||||||
self.refresh_bounding_box()
|
self.refresh_bounding_box()
|
||||||
for parent in self.parents:
|
for parent in self.parents:
|
||||||
parent.note_updated_family()
|
parent.note_changed_family()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def get_family(self, recurse: bool = True) -> list[Mobject]:
|
def get_family(self, recurse: bool = True) -> list[Mobject]:
|
||||||
|
@ -459,7 +459,7 @@ class Mobject(object):
|
||||||
self.submobjects.append(mobject)
|
self.submobjects.append(mobject)
|
||||||
if self not in mobject.parents:
|
if self not in mobject.parents:
|
||||||
mobject.parents.append(self)
|
mobject.parents.append(self)
|
||||||
self.note_updated_family()
|
self.note_changed_family()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def remove(
|
def remove(
|
||||||
|
@ -475,7 +475,7 @@ class Mobject(object):
|
||||||
if parent in child.parents:
|
if parent in child.parents:
|
||||||
child.parents.remove(parent)
|
child.parents.remove(parent)
|
||||||
if reassemble:
|
if reassemble:
|
||||||
parent.note_updated_family()
|
parent.note_changed_family()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def clear(self) -> Self:
|
def clear(self) -> Self:
|
||||||
|
@ -492,12 +492,12 @@ class Mobject(object):
|
||||||
old_submob.parents.remove(self)
|
old_submob.parents.remove(self)
|
||||||
self.submobjects[index] = new_submob
|
self.submobjects[index] = new_submob
|
||||||
new_submob.parents.append(self)
|
new_submob.parents.append(self)
|
||||||
self.note_updated_family()
|
self.note_changed_family()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def insert_submobject(self, index: int, new_submob: Mobject) -> Self:
|
def insert_submobject(self, index: int, new_submob: Mobject) -> Self:
|
||||||
self.submobjects.insert(index, new_submob)
|
self.submobjects.insert(index, new_submob)
|
||||||
self.note_updated_family()
|
self.note_changed_family()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def set_submobjects(self, submobject_list: list[Mobject]) -> Self:
|
def set_submobjects(self, submobject_list: list[Mobject]) -> Self:
|
||||||
|
@ -609,7 +609,7 @@ class Mobject(object):
|
||||||
self.submobjects.sort(key=submob_func)
|
self.submobjects.sort(key=submob_func)
|
||||||
else:
|
else:
|
||||||
self.submobjects.sort(key=lambda m: point_to_num_func(m.get_center()))
|
self.submobjects.sort(key=lambda m: point_to_num_func(m.get_center()))
|
||||||
self.note_updated_family(only_changed_order=True)
|
self.note_changed_family(only_changed_order=True)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def shuffle(self, recurse: bool = False) -> Self:
|
def shuffle(self, recurse: bool = False) -> Self:
|
||||||
|
@ -617,12 +617,12 @@ class Mobject(object):
|
||||||
for submob in self.submobjects:
|
for submob in self.submobjects:
|
||||||
submob.shuffle(recurse=True)
|
submob.shuffle(recurse=True)
|
||||||
random.shuffle(self.submobjects)
|
random.shuffle(self.submobjects)
|
||||||
self.note_updated_family(only_changed_order=True)
|
self.note_changed_family(only_changed_order=True)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def reverse_submobjects(self) -> Self:
|
def reverse_submobjects(self) -> Self:
|
||||||
self.submobjects.reverse()
|
self.submobjects.reverse()
|
||||||
self.note_updated_family(only_changed_order=True)
|
self.note_changed_family(only_changed_order=True)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
# Copying and serialization
|
# Copying and serialization
|
||||||
|
|
Loading…
Add table
Reference in a new issue