| @@ -195,7 +195,7 @@ get_text_size <- function(x = NULL) { | |||
| get_title_size <- function(x = NULL) { | |||
| if (!is.null(x)) return(x) | |||
| plot_settings$anim_opts$text_size %||% | |||
| plot_settings$anim_opts$title_size %||% | |||
| getFromNamespace("theme_env", "ggplot2")$current$plot.title$size %||% | |||
| plot_settings$default$title_size | |||
| } | |||
| @@ -12,6 +12,7 @@ test_that("setting and getting animation options works", { | |||
| expect_equal(get_anim_opt(), anim_options(text_size = 5, title_size = 10)) | |||
| expect_error(get_anim_opt("text_size")) | |||
| expect_equal(get_text_size(), get_anim_opt()$text_size) | |||
| expect_equal(get_title_size(), get_anim_opt()$title_size) | |||
| anim_options_set(anim_options(2, 1)) | |||
| expect_equal(get_anim_opt("transition_length"), 2) | |||