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