mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +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
|
# that of the newly constructed object
|
||||||
brace = always_redraw(Brace, square, UP)
|
brace = always_redraw(Brace, square, UP)
|
||||||
|
|
||||||
text, number = label = VGroup(
|
label = TexText("Width = 0.00")
|
||||||
Text("Width = "),
|
number = label.make_number_changable("0.00")
|
||||||
DecimalNumber(
|
|
||||||
0,
|
|
||||||
show_ellipsis=True,
|
|
||||||
num_decimal_places=2,
|
|
||||||
include_sign=True,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
label.arrange(RIGHT)
|
|
||||||
|
|
||||||
# This ensures that the method deicmal.next_to(square)
|
# This ensures that the method deicmal.next_to(square)
|
||||||
# is called on every frame
|
# is called on every frame
|
||||||
|
|
Loading…
Add table
Reference in a new issue