diff --git a/DESCRIPTION b/DESCRIPTION index 7439fb415b..5c10f5b5e6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: plotly Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library -Version: 2.4.3 +Version: 2.4.4 Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"), email = "cpsievert1@gmail.com"), person("Chris", "Parmer", role = c("aut", "cph"), diff --git a/NEWS b/NEWS index 61a7183d92..7280cf54c7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +2.4.4 -- 13 Feb 2015 + +as.widget() now returns htmlwidget objects untouched. See #449. + 2.4.3 -- 11 Feb 2015 Ensure that we always return HTTPS links. Fixes #455 diff --git a/R/print.R b/R/print.R index 5de936aefe..cfbddab8d9 100644 --- a/R/print.R +++ b/R/print.R @@ -31,7 +31,9 @@ knit_print.plotly <- function(x, options, ...) { #' htmlwidgets::saveWidget(as.widget(p), "index.html") #' } #' + as.widget <- function(x, ...) { + if (inherits(x, "htmlwidget")) return(x) p <- plotly_build(x) # set some margin defaults if none are provided p$layout$margin <- modifyList(