fix the depth of svg tag

This commit is contained in:
TonyCrane 2022-01-25 13:14:19 +08:00
parent 09ced7ce9a
commit bbb4fa155c
No known key found for this signature in database
GPG key ID: 2313A5058A9C637C

View file

@ -71,8 +71,9 @@ class SVGMobject(VMobject):
doc = minidom.parse(self.file_path)
self.ref_to_element = {}
for svg in doc.getElementsByTagName("svg"):
mobjects = self.get_mobjects_from(svg)
for child in doc.childNodes:
if child.tagName != 'svg': continue
mobjects = self.get_mobjects_from(child)
if self.unpack_groups:
self.add(*mobjects)
else: