mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Small cleanup on TexMobject
This commit is contained in:
parent
ce57e342b1
commit
9bcd8de865
1 changed files with 4 additions and 7 deletions
|
@ -49,9 +49,9 @@ class SingleStringTexMobject(SVGMobject):
|
|||
def __init__(self, tex_string, **kwargs):
|
||||
digest_config(self, kwargs)
|
||||
assert(isinstance(tex_string, str))
|
||||
self.tex_string = self.get_modified_expression(tex_string)
|
||||
self.tex_string = tex_string
|
||||
file_name = tex_to_svg_file(
|
||||
self.tex_string,
|
||||
self.get_modified_expression(tex_string),
|
||||
self.template_tex_file
|
||||
)
|
||||
SVGMobject.__init__(self, file_name=file_name, **kwargs)
|
||||
|
@ -149,11 +149,8 @@ class TexMobject(SingleStringTexMobject):
|
|||
"""
|
||||
new_submobjects = []
|
||||
curr_index = 0
|
||||
# TODO, remove this attribute
|
||||
self.expression_parts = list(self.tex_strings)
|
||||
for expr in self.tex_strings:
|
||||
sub_tex_mob = SingleStringTexMobject(expr, **self.CONFIG)
|
||||
sub_tex_mob.tex_string = expr # We want it unmodified
|
||||
for tex_string in self.tex_strings:
|
||||
sub_tex_mob = SingleStringTexMobject(tex_string, **self.CONFIG)
|
||||
num_submobs = len(sub_tex_mob.submobjects)
|
||||
new_index = curr_index + num_submobs
|
||||
if num_submobs == 0:
|
||||
|
|
Loading…
Add table
Reference in a new issue