No longer any need for custom hash_seeds in Tex and Text

This commit is contained in:
Grant Sanderson 2024-12-05 15:05:26 -06:00
parent 85f8456228
commit 4251ff436a
2 changed files with 0 additions and 45 deletions

View file

@ -67,23 +67,6 @@ class Tex(StringMobject):
self.set_color_by_tex_to_color_map(self.tex_to_color_map)
self.scale(SCALE_FACTOR_PER_FONT_POINT * font_size)
@property
def hash_seed(self) -> tuple:
return (
self.__class__.__name__,
self.svg_default,
self.path_string_config,
self.base_color,
self.isolate,
self.protect,
self.tex_string,
self.alignment,
self.tex_environment,
self.tex_to_color_map,
self.template,
self.additional_preamble
)
def get_svg_string_by_content(self, content: str) -> str:
return latex_to_svg(content, self.template, self.additional_preamble, short_tex=self.tex_string)

View file

@ -197,34 +197,6 @@ class MarkupText(StringMobject):
if height is None:
self.scale(TEXT_MOB_SCALE_FACTOR)
@property
def hash_seed(self) -> tuple:
return (
self.__class__.__name__,
self.svg_default,
self.path_string_config,
self.base_color,
self.isolate,
self.protect,
self.text,
self.font_size,
self.lsh,
self.justify,
self.indent,
self.alignment,
self.line_width,
self.font,
self.slant,
self.weight,
self.t2c,
self.t2f,
self.t2s,
self.t2w,
self.global_config,
self.local_configs,
self.disable_ligatures
)
def get_svg_string_by_content(self, content: str) -> str:
self.content = content
return markup_to_svg(