Skip to content

Commit

Permalink
go back to using ggplotly() to prepare the widget for shiny rendering
Browse files Browse the repository at this point in the history
* the extra call to plotly_build() forces more computation then necessary and fixes #1569
  • Loading branch information
cpsievert committed Jul 13, 2019
1 parent 2a439bc commit a0fa68f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0fa68f

Please sign in to comment.