Merge pull request #1112 from vivek3141/patch-1

Add dot_color to BulletedList
This commit is contained in:
鹤翔万里 2020-09-30 23:27:29 +08:00 committed by GitHub
commit 53756ea140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -257,6 +257,7 @@ class BulletedList(TextMobject):
CONFIG = {
"buff": MED_LARGE_BUFF,
"dot_scale_factor": 2,
"dot_color": WHITE,
# Have to include because of handle_multiple_args implementation
"template_tex_file_body": TEMPLATE_TEXT_FILE_BODY,
"alignment": "",
@ -266,7 +267,7 @@ class BulletedList(TextMobject):
line_separated_items = [s + "\\\\" for s in items]
TextMobject.__init__(self, *line_separated_items, **kwargs)
for part in self:
dot = TexMobject("\\cdot").scale(self.dot_scale_factor)
dot = TexMobject("\\cdot", color=self.dot_color).scale(self.dot_scale_factor)
dot.next_to(part[0], LEFT, SMALL_BUFF)
part.add_to_back(dot)
self.arrange(