Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Update some Text Mobject changes

xy-239b3e60f5ce20
diff --git a/manimlib/constants.py b/manimlib/constants.py
index 57ec438ce..82d2298df 100644
--- a/manimlib/constants.py
+++ b/manimlib/constants.py
@@ -38,7 +38,7 @@ def initialize_directories(config):
"directory were both passed"
)
- TEX_DIR = config["tex_dir"] or os.path.join(MEDIA_DIR, "texs")
+ TEX_DIR = config["tex_dir"] or os.path.join(MEDIA_DIR, "Tex")
TEXT_DIR = os.path.join(MEDIA_DIR, "texts")
if not video_path_specified:
VIDEO_DIR = os.path.join(MEDIA_DIR, "videos")
diff --git a/manimlib/mobject/svg/svg_mobject.py b/manimlib/mobject/svg/svg_mobject.py
index 219134f92..4798003a2 100644
--- a/manimlib/mobject/svg/svg_mobject.py
+++ b/manimlib/mobject/svg/svg_mobject.py
@@ -286,17 +286,11 @@ class SVGMobject(VMobject):
def flatten(self, input_list):
output_list = []
- while True:
- if input_list == []:
- break
- for index, i in enumerate(input_list):
- if type(i)== list:
- input_list = i + input_list[index+1:]
- break
- else:
- output_list.append(i)
- input_list.pop(index)
- break
+ for i in input_list:
+ if isinstance(i, list):
+ output_list.extend(self.flatten(i))
+ else:
+ output_list.append(i)
return output_list
def get_all_childNodes_have_id(self, element):