mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Make sure a group inherits the fixed_in_frame status of its parts
This commit is contained in:
parent
65afed1bd1
commit
a8da171adb
1 changed files with 2 additions and 0 deletions
|
@ -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))
|
||||||
|
|
Loading…
Add table
Reference in a new issue