Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Fix alignment of minus sign to numbers

Guillermo Garzaae1efc6009e1
diff --git a/manimlib/mobject/numbers.py b/manimlib/mobject/numbers.py
index 5abbc8d79..d3f76a8ef 100644
--- a/manimlib/mobject/numbers.py
+++ b/manimlib/mobject/numbers.py
@@ -62,7 +62,8 @@ class DecimalNumber(VMobject):
# to the bottom
for i, c in enumerate(num_string):
if c == "-" and len(num_string) > i + 1:
- self[i].align_to(self[i + 1], alignment_vect=UP)
+ self[i].align_to(self[i + 1], UP)
+ self[i].shift(self[i+1].get_height() * DOWN / 2)
elif c == ",":
self[i].shift(self[i].get_height() * DOWN / 2)
if self.unit and self.unit.startswith("^"):