Stop displaying when writing is happening

This commit is contained in:
Grant Sanderson 2022-02-13 14:51:32 -08:00
parent 948620944b
commit 58e06e8f6b

View file

@ -36,20 +36,19 @@ class SingleStringTex(VMobject):
assert(isinstance(tex_string, str)) assert(isinstance(tex_string, str))
self.tex_string = tex_string self.tex_string = tex_string
if tex_string not in tex_string_with_color_to_mob_map: if tex_string not in tex_string_with_color_to_mob_map:
with display_during_execution(f" Writing \"{tex_string}\""): full_tex = self.get_tex_file_body(tex_string)
full_tex = self.get_tex_file_body(tex_string) filename = tex_to_svg_file(full_tex)
filename = tex_to_svg_file(full_tex) svg_mob = SVGMobject(
svg_mob = SVGMobject( filename,
filename, height=None,
height=None, color=self.color,
color=self.color, stroke_width=self.stroke_width,
stroke_width=self.stroke_width, path_string_config={
path_string_config={ "should_subdivide_sharp_curves": True,
"should_subdivide_sharp_curves": True, "should_remove_null_curves": True,
"should_remove_null_curves": True, }
} )
) tex_string_with_color_to_mob_map[(self.color, tex_string)] = svg_mob
tex_string_with_color_to_mob_map[(self.color, tex_string)] = svg_mob
self.add(*( self.add(*(
sm.copy() sm.copy()
for sm in tex_string_with_color_to_mob_map[(self.color, tex_string)] for sm in tex_string_with_color_to_mob_map[(self.color, tex_string)]