Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Temporary bug fix on DecimalNumber...not fully figured out

Grant Sanderson2e64edcffe42
diff --git a/mobject/numbers.py b/mobject/numbers.py
index e1e65d576..c8219c4f9 100644
--- a/mobject/numbers.py
+++ b/mobject/numbers.py
@@ -98,14 +98,20 @@ class DecimalNumber(VMobject):
])
def set_value(self, number, **config):
- full_config = dict(self.initial_config)
+ full_config = dict(self.CONFIG)
+ full_config.update(self.initial_config)
full_config.update(config)
new_decimal = DecimalNumber(number, **full_config)
new_decimal.match_height(self)
new_decimal.move_to(self, LEFT)
new_decimal.match_style(self)
+ old_family = self.get_family()
self.submobjects = new_decimal.submobjects
+ for mob in old_family:
+ # Dumb hack...due to how scene handles families
+ # of animated mobjects
+ mob.points[:] = 0
self.number = number
def get_value(self):