Make sure a group inherits the fixed_in_frame status of its parts

This commit is contained in:
Grant Sanderson
2023-01-26 15:58:56 -08:00
parent 65afed1bd1
commit a8da171adb

View File

@ -2048,6 +2048,8 @@ class Group(Mobject):
raise Exception("All submobjects must be of type Mobject") raise Exception("All submobjects must be of type Mobject")
Mobject.__init__(self, **kwargs) Mobject.__init__(self, **kwargs)
self.add(*mobjects) self.add(*mobjects)
if any(m.is_fixed_in_frame for m in mobjects):
self.fix_in_frame()
def __add__(self, other: Mobject | Group): def __add__(self, other: Mobject | Group):
assert(isinstance(other, Mobject)) assert(isinstance(other, Mobject))