Skip to content

Commit

Permalink
Fix #480 avoid removing last frame data for subsequent groups
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Aug 30, 2023
1 parent 6afe0a7 commit 9e44de6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Fix for using `"svg"` device during knitting (#484)
* Fix for correctly getting chunk options during knitting (#485)
* Fix a bug in `transition_reveal()` that would remove terminal data (#480)

# gganimate 1.0.8

Expand Down
5 changes: 4 additions & 1 deletion R/transition_reveal.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ TransitionReveal <- ggproto('TransitionReveal', Transition,
)
all_frames$group <- paste0(all_frames$group, '<', all_frames$.frame, '>')
all_frames$.frame <- NULL
all_frames[!(c(diff(all_frames$.time), 1) <= .Machine$double.eps & all_frames$.phase == 'raw'), ]
repeated <- c(diff(all_frames$.time), 1) <= .Machine$double.eps &
c(all_frames$group[-nrow(all_frames)] == all_frames$group[-1], TRUE) &
all_frames$.phase == 'raw'
all_frames[!repeated, ]
}
)

Expand Down

0 comments on commit 9e44de6

Please sign in to comment.