Remoe height defaults form __init__args of SingleStringTex and String

This commit is contained in:
Grant Sanderson 2022-12-19 14:43:10 -08:00
parent ef64b90ed3
commit 2c20a1509e
2 changed files with 5 additions and 2 deletions

View file

@ -51,10 +51,11 @@ class StringMobject(SVGMobject, ABC):
so that each submobject of the original `SVGMobject` will be labelled
by the color of its paired submobject from the additional `SVGMobject`.
"""
height = None
def __init__(
self,
string: str,
height: float | None = None,
fill_color: ManimColor = WHITE,
stroke_color: ManimColor = WHITE,
stroke_width: float = 0,
@ -75,7 +76,6 @@ class StringMobject(SVGMobject, ABC):
self.parse()
super().__init__(
height=height,
stroke_color=stroke_color,
fill_color=fill_color,
stroke_width=stroke_width,

View file

@ -25,6 +25,8 @@ SCALE_FACTOR_PER_FONT_POINT = 0.001
class SingleStringTex(SVGMobject):
height: float | None = None
def __init__(
self,
tex_string: str,
@ -60,6 +62,7 @@ class SingleStringTex(SVGMobject):
fill_color=fill_color,
fill_opacity=fill_opacity,
stroke_width=stroke_width,
path_string_config=path_string_config,
**kwargs
)