mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Update some Text Mobject changes
This commit is contained in:
parent
0983fa11be
commit
9b3e60f5ce
2 changed files with 6 additions and 12 deletions
|
@ -38,7 +38,7 @@ def initialize_directories(config):
|
||||||
"directory were both passed"
|
"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")
|
TEXT_DIR = os.path.join(MEDIA_DIR, "texts")
|
||||||
if not video_path_specified:
|
if not video_path_specified:
|
||||||
VIDEO_DIR = os.path.join(MEDIA_DIR, "videos")
|
VIDEO_DIR = os.path.join(MEDIA_DIR, "videos")
|
||||||
|
|
|
@ -286,17 +286,11 @@ class SVGMobject(VMobject):
|
||||||
|
|
||||||
def flatten(self, input_list):
|
def flatten(self, input_list):
|
||||||
output_list = []
|
output_list = []
|
||||||
while True:
|
for i in input_list:
|
||||||
if input_list == []:
|
if isinstance(i, list):
|
||||||
break
|
output_list.extend(self.flatten(i))
|
||||||
for index, i in enumerate(input_list):
|
else:
|
||||||
if type(i)== list:
|
output_list.append(i)
|
||||||
input_list = i + input_list[index+1:]
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
output_list.append(i)
|
|
||||||
input_list.pop(index)
|
|
||||||
break
|
|
||||||
return output_list
|
return output_list
|
||||||
|
|
||||||
def get_all_childNodes_have_id(self, element):
|
def get_all_childNodes_have_id(self, element):
|
||||||
|
|
Loading…
Add table
Reference in a new issue