mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
In UpdatersExample, use Tex.make_number_changable
This commit is contained in:
parent
077f264890
commit
f42b3bfa3e
1 changed files with 2 additions and 10 deletions
|
@ -268,16 +268,8 @@ class UpdatersExample(Scene):
|
|||
# that of the newly constructed object
|
||||
brace = always_redraw(Brace, square, UP)
|
||||
|
||||
text, number = label = VGroup(
|
||||
Text("Width = "),
|
||||
DecimalNumber(
|
||||
0,
|
||||
show_ellipsis=True,
|
||||
num_decimal_places=2,
|
||||
include_sign=True,
|
||||
)
|
||||
)
|
||||
label.arrange(RIGHT)
|
||||
label = TexText("Width = 0.00")
|
||||
number = label.make_number_changable("0.00")
|
||||
|
||||
# This ensures that the method deicmal.next_to(square)
|
||||
# is called on every frame
|
||||
|
|
Loading…
Add table
Reference in a new issue