From 3ffdea0d67c101f8be4ba67d036de28b1a61219c Mon Sep 17 00:00:00 2001 From: cpsievert Date: Fri, 12 Feb 2016 11:36:45 +0900 Subject: [PATCH 1/2] as.widget() should return htmlwidget objects untouched --- R/print.R | 2 ++ 1 file changed, 2 insertions(+) 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( From 5e9264f1977d2f9f54c2ed01411ab8246721565f Mon Sep 17 00:00:00 2001 From: cpsievert Date: Sat, 13 Feb 2016 08:53:42 +0900 Subject: [PATCH 2/2] bump version; update news --- DESCRIPTION | 2 +- NEWS | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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