Small fixes to NumberLine

This commit is contained in:
Grant Sanderson 2021-03-18 17:37:12 -07:00
parent 611ac7f448
commit 8345ca6160

View file

@ -144,7 +144,7 @@ class NumberLine(Line):
direction=direction,
buff=buff
)
if x < 0 and self.line_to_number_direction[0] == 0:
if x < 0 and direction[0] == 0:
# Align without the minus sign
num_mob.shift(num_mob[0].get_width() * LEFT / 2)
return num_mob
@ -155,10 +155,11 @@ class NumberLine(Line):
kwargs["font_size"] = font_size
if excluding is None:
excluding = self.numbers_to_exclude
numbers = VGroup()
for x in x_values:
if x in self.numbers_to_exclude:
continue
if excluding is not None and x in excluding:
continue
numbers.add(self.get_number_mobject(x, **kwargs))