From a0fa68fb6f88b682dbb76a56472b449cd7d23226 Mon Sep 17 00:00:00 2001 From: Carson Date: Sat, 13 Jul 2019 12:13:34 -0500 Subject: [PATCH] go back to using ggplotly() to prepare the widget for shiny rendering * the extra call to plotly_build() forces more computation then necessary and fixes #1569 --- R/shiny.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/shiny.R b/R/shiny.R index 65877d6526..d46f164c9b 100644 --- a/R/shiny.R +++ b/R/shiny.R @@ -58,9 +58,9 @@ renderPlotly <- function(expr, env = parent.frame(), quoted = FALSE) { # Converts a plot, OR a promise of a plot, to plotly prepareWidget <- function(x) { p <- if (promises::is.promising(x)) { - promises::then(x, plotly_build) + promises::then(x, ggplotly) } else { - plotly_build(x) + ggplotly(x) } register_plot_events(p) p