Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Fix bug (#1786)

Mohammad Al-Fetyani11df83125c99
diff --git a/manim/mobject/numbers.py b/manim/mobject/numbers.py
index fdcd378cf..2a875d23a 100644
--- a/manim/mobject/numbers.py
+++ b/manim/mobject/numbers.py
@@ -190,7 +190,10 @@ class DecimalNumber(VMobject, metaclass=ConvertToOpenGL):
new_decimal.scale(self[-1].height / new_decimal[-1].height)
new_decimal.move_to(self, self.edge_to_fix)
new_decimal.match_style(self)
- self.become(new_decimal)
+ old_family = self.get_family()
+ self.set_submobjects(new_decimal.submobjects)
+ for mobj in old_family:
+ mobj.clear_points()
self.number = number
return self