Skip to content

Commit 888b301

Browse files
committed
Merge pull request #462 from ropensci/fix/as-widget
as.widget() should return htmlwidget objects untouched
2 parents 2b9d003 + 5e9264f commit 888b301

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library
3-
Version: 2.4.3
3+
Version: 2.4.4
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "[email protected]"),
66
person("Chris", "Parmer", role = c("aut", "cph"),

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.4.4 -- 13 Feb 2015
2+
3+
as.widget() now returns htmlwidget objects untouched. See #449.
4+
15
2.4.3 -- 11 Feb 2015
26

37
Ensure that we always return HTTPS links. Fixes #455

R/print.R

+2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ knit_print.plotly <- function(x, options, ...) {
3131
#' htmlwidgets::saveWidget(as.widget(p), "index.html")
3232
#' }
3333
#'
34+
3435
as.widget <- function(x, ...) {
36+
if (inherits(x, "htmlwidget")) return(x)
3537
p <- plotly_build(x)
3638
# set some margin defaults if none are provided
3739
p$layout$margin <- modifyList(

0 commit comments

Comments
 (0)