mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Fix alignment of minus sign to numbers
This commit is contained in:
parent
3aca85e47d
commit
ae1efc6009
1 changed files with 2 additions and 1 deletions
|
@ -62,7 +62,8 @@ class DecimalNumber(VMobject):
|
||||||
# to the bottom
|
# to the bottom
|
||||||
for i, c in enumerate(num_string):
|
for i, c in enumerate(num_string):
|
||||||
if c == "-" and len(num_string) > i + 1:
|
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 == ",":
|
elif c == ",":
|
||||||
self[i].shift(self[i].get_height() * DOWN / 2)
|
self[i].shift(self[i].get_height() * DOWN / 2)
|
||||||
if self.unit and self.unit.startswith("^"):
|
if self.unit and self.unit.startswith("^"):
|
||||||
|
|
Loading…
Add table
Reference in a new issue