Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): do not terminate slides early #162

Merged
merged 2 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ def construct(self):
self.next_slide() # Waits user to press continue to go to the next slide


class MultipleAnimationsInLastSlide(Slide):
"""This is used to check against solution for issue #161."""

def construct(self):
circle = Circle(color=BLUE)
dot = Dot()

self.play(GrowFromCenter(circle))
self.play(FadeIn(dot))
self.next_slide()

self.play(dot.animate.move_to(RIGHT))
self.play(dot.animate.move_to(UP))
self.play(dot.animate.move_to(LEFT))
self.play(dot.animate.move_to(DOWN))

self.next_slide()


class TestFileTooLong(Slide):
"""This is used to check against solution for issue #123."""

Expand Down
2 changes: 2 additions & 0 deletions manim_slides/present.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ def current_cap(self) -> cv2.VideoCapture:
def rewind_current_slide(self) -> None:
"""Rewinds current slide to first frame."""
logger.debug("Rewinding current slide")
self.current_slide.terminated = False

if self.reverse:
self.current_animation = self.current_slide.end_animation - 1
else:
Expand Down