mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Small fixes to NumberLine
This commit is contained in:
parent
611ac7f448
commit
8345ca6160
1 changed files with 4 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue