Skip to content

Commit

Permalink
Fix dot updater in graph example
Browse files Browse the repository at this point in the history
  • Loading branch information
3b1b committed Aug 1, 2024
1 parent d644e3b commit 71814a1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions example_scenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,7 @@ def construct(self):
# with the intent of having other mobjects update based
# on the parameter
x_tracker = ValueTracker(2)
f_always(
dot.move_to,
lambda: axes.i2gp(x_tracker.get_value(), parabola)
)
dot.add_updater(lambda d: d.move_to(axes.i2gp(x_tracker.get_value(), parabola)))

self.play(x_tracker.animate.set_value(4), run_time=3)
self.play(x_tracker.animate.set_value(-2), run_time=3)
Expand Down

0 comments on commit 71814a1

Please sign in to comment.