Resolve conflicts

This commit is contained in:
YishiMichael 2022-05-28 12:40:29 +08:00
parent 9386461d27
commit 22a3bef670
No known key found for this signature in database
GPG key ID: EC615C0C5A86BC80
2 changed files with 8 additions and 8 deletions

View file

@ -192,6 +192,8 @@ class TransformMatchingStrings(AnimationGroup):
target_indices_lists, target_indices target_indices_lists, target_indices
) )
if not source_indices_lists or not target_indices_lists: if not source_indices_lists or not target_indices_lists:
source_indices.extend(it.chain(*source_indices_lists))
target_indices.extend(it.chain(*target_indices_lists))
continue continue
anims.append(anim_class( anims.append(anim_class(
source.build_parts_from_indices_lists(source_indices_lists), source.build_parts_from_indices_lists(source_indices_lists),

View file

@ -116,15 +116,13 @@ class SVGMobject(VMobject):
"style" "style"
) )
root = element_tree.getroot() root = element_tree.getroot()
style_attrs = {} style_attrs = {
rest_attrs = {} k: v
for k, v in root.attrib.items(): for k, v in root.attrib.items()
if k in style_keys: if k in style_keys
style_attrs[k] = v }
else:
rest_attrs[k] = v
new_root = ET.Element("svg", rest_attrs) new_root = ET.Element("svg", {}) # TODO: width, height
config_style_node = ET.SubElement(new_root, "g", config_style_attrs) config_style_node = ET.SubElement(new_root, "g", config_style_attrs)
root_style_node = ET.SubElement(config_style_node, "g", style_attrs) root_style_node = ET.SubElement(config_style_node, "g", style_attrs)
root_style_node.extend(root) root_style_node.extend(root)