mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 05:24:22 +08:00
Tiny changes to mobject
This commit is contained in:
@ -770,10 +770,10 @@ class Mobject(Container):
|
||||
self.null_point_align(mobject)
|
||||
self_count = len(self.submobjects)
|
||||
mob_count = len(mobject.submobjects)
|
||||
diff = abs(self_count-mob_count)
|
||||
if self_count < mob_count:
|
||||
self.add_n_more_submobjects(diff)
|
||||
elif mob_count < self_count:
|
||||
diff = self_count-mob_count
|
||||
if diff < 0:
|
||||
self.add_n_more_submobjects(-diff)
|
||||
elif diff > 0:
|
||||
mobject.add_n_more_submobjects(diff)
|
||||
return self
|
||||
|
||||
|
@ -42,7 +42,8 @@ class VMobject(Mobject):
|
||||
stroke_width = None,
|
||||
fill_color = None,
|
||||
fill_opacity = None,
|
||||
family = True):
|
||||
family = True
|
||||
):
|
||||
if stroke_color is not None:
|
||||
self.stroke_rgb = color_to_rgb(stroke_color)
|
||||
if fill_color is not None:
|
||||
|
Reference in New Issue
Block a user