mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 20:43:56 +08:00
Make sure a group inherits the fixed_in_frame status of its parts
This commit is contained in:
@ -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))
|
||||||
|
Reference in New Issue
Block a user