소스 검색

Add print method for anim_options()

pull/18/head
Garrick Aden-Buie 7 년 전
부모
커밋
2cd7b44891
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. +9
    -0
      R/plot_helpers.R

+ 9
- 0
R/plot_helpers.R 파일 보기

@@ -52,6 +52,15 @@ anim_options <- function(
)
}

print.anim_opts <- function(ao) {
aop <- ao
# Replace ggproto (enter/exit functions) with their names
aop$enter <- paste("ggproto:", names(ao$enter))
aop$exit <- paste("ggproto:", names(ao$exit))
str(aop)
invisible(ao)
}

validate_anim_opts <- function(ao, quiet = FALSE, strict = getOption("tidyexplain.strict_dots", FALSE)) {
if (!inherits(ao, "anim_opts")) {
rlang::warn("Use `anim_options()` to set `anim_opts`")

Loading…
취소
저장