@@ -211,26 +211,6 @@ gg2list <- function(p, width = NULL, height = NULL,
211211 )
212212 }
213213
214- # we currently support ggplot2 >= 2.2.1 (see DESCRIPTION)
215- # there are too many naming changes in 2.2.1.9000 to realistically
216- if (! is_dev_ggplot2()) {
217- message(
218- " We recommend that you use the dev version of ggplot2 with `ggplotly()`\n " ,
219- " Install it with: `devtools::install_github('tidyverse/ggplot2')`"
220- )
221- if (! identical(dynamicTicks , FALSE )) {
222- warning(
223- " You need the dev version of ggplot2 to use `dynamicTicks`" , call. = FALSE
224- )
225- }
226- return (
227- gg2list_legacy(
228- p , width = width , height = height , tooltip = tooltip ,
229- layerData = layerData , originalData = originalData , source = source , ...
230- )
231- )
232- }
233-
234214 # ------------------------------------------------------------------------
235215 # Our internal version of ggplot2::ggplot_build(). Modified from
236216 # https://github.com/hadley/ggplot2/blob/0cd0ba/R/plot-build.r#L18-L92
@@ -265,8 +245,7 @@ gg2list <- function(p, width = NULL, height = NULL,
265245 # save the domain of the group for display in tooltips
266246 groupDomains <- Map(function (x , y ) {
267247 aes_g <- y $ mapping [[" group" ]] %|| % plot $ mapping [[" group" ]]
268- eval_ <- if (is_dev_ggplot2()) rlang :: eval_tidy else base :: eval
269- tryNULL(eval_(aes_g , x ))
248+ tryNULL(rlang :: eval_tidy(aes_g , x ))
270249 }, data , layers )
271250
272251 # for simple (StatIdentity) geoms, add crosstalk key to aes mapping
@@ -1286,10 +1265,6 @@ rect2shape <- function(rekt = ggplot2::element_rect()) {
12861265 )
12871266}
12881267
1289- is_dev_ggplot2 <- function () {
1290- packageVersion(" ggplot2" ) > " 2.2.1"
1291- }
1292-
12931268# We need access to internal ggplot2 functions in several places
12941269# this helps us import functions in a way that R CMD check won't cry about
12951270ggfun <- function (x ) {
0 commit comments