Fix data["orientation"] alignment issue a separate way

This commit is contained in:
Grant Sanderson 2022-12-23 17:57:24 -07:00
parent db52d0a73f
commit 62c9e2b58f
2 changed files with 4 additions and 1 deletions

View file

@ -113,7 +113,6 @@ class FadeTransform(Transform):
start, end = self.starting_mobject, self.ending_mobject
for m0, m1 in ((start[1], start[0]), (end[0], end[1])):
self.ghost_to(m0, m1)
self.ending_mobject.align_data(self.mobject)
def ghost_to(self, source: Mobject, target: Mobject) -> None:
source.replace(target, stretch=self.stretch, dim_to_match=self.dim_to_match)

View file

@ -944,6 +944,10 @@ class VMobject(Mobject):
def refresh_triangulation(self):
for mob in self.get_family():
mob.needs_new_triangulation = True
mob.data["orientation"] = resize_array(
mob.data["orientation"],
mob.get_num_points()
)
return self
def get_triangulation(self):