A community-maintained Python framework for creating mathematical animations.
Give Decimal the same heirarchy as TexMobject
Grant Sanderson54f833826c88
diff --git a/mobject/numbers.py b/mobject/numbers.pyindex c735019c6..3fc2847f8 100644--- a/mobject/numbers.py+++ b/mobject/numbers.py@@ -2,7 +2,7 @@ from __future__ import absolute_importfrom constants import *-from mobject.svg.tex_mobject import TexMobject+from mobject.svg.tex_mobject import SingleStringTexMobjectfrom mobject.types.vectorized_mobject import VMobject@@ -34,13 +34,13 @@ class DecimalNumber(VMobject):if num_string == negative_zero_string:num_string = num_string[1:]self.add(*[- TexMobject(char, **kwargs)+ SingleStringTexMobject(char, **kwargs)for char in num_string])# Add non-numerical bitsif self.show_ellipsis:- self.add(TexMobject("\\dots"))+ self.add(SingleStringTexMobject("\\dots"))if num_string.startswith("-"):minus = self.submobjects[0]@@ -50,7 +50,7 @@ class DecimalNumber(VMobject):)if self.unit is not None:- self.unit_sign = TexMobject(self.unit, color=self.color)+ self.unit_sign = SingleStringTexMobject(self.unit, color=self.color)self.add(self.unit_sign)self.arrange_submobjects(