浏览代码

Add print method for anim_options()

pull/18/head
父节点
当前提交
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`")

正在加载...
取消
保存