mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Temporary bug fix on DecimalNumber...not fully figured out
This commit is contained in:
parent
94b1c9d3af
commit
2e64edcffe
1 changed files with 7 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue