From d996cf7c8f22d36121f249497cabbd52eb1d9c20 Mon Sep 17 00:00:00 2001 From: Carson Sievert Date: Tue, 30 May 2017 15:49:15 -0500 Subject: [PATCH 1/2] go back to yaml dependency declaration for main bundle --- R/plotly.R | 3 +-- inst/htmlwidgets/plotly.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/R/plotly.R b/R/plotly.R index 0a5cc66110..88d985b5e3 100644 --- a/R/plotly.R +++ b/R/plotly.R @@ -355,8 +355,7 @@ as_widget <- function(x, ...) { preRenderHook = plotly_build, dependencies = c( list(typedArrayPolyfill()), - crosstalk::crosstalkLibs(), - list(plotlyMainBundle()) + crosstalk::crosstalkLibs()#,list(plotlyMainBundle()) ) ) # set an ID to avoid the rmarkdown warning ('.Random.seed' is not an integer vector but of type 'NULL', so ignored) diff --git a/inst/htmlwidgets/plotly.yaml b/inst/htmlwidgets/plotly.yaml index e69de29bb2..6880157cb4 100644 --- a/inst/htmlwidgets/plotly.yaml +++ b/inst/htmlwidgets/plotly.yaml @@ -0,0 +1,6 @@ +dependencies: + - name: plotlyjs + version: 1.27.1 + src: "htmlwidgets/lib/plotlyjs" + script: plotly-latest.min.js + stylesheet: plotly-htmlwidgets.css From 87344c12d9f792695191c2ccd3451f90a4b6ebf1 Mon Sep 17 00:00:00 2001 From: Carson Sievert Date: Fri, 2 Jun 2017 13:59:15 -0500 Subject: [PATCH 2/2] system.file doesn't normalize paths on windoze... --- R/plotly.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/plotly.R b/R/plotly.R index 33c0a2f766..bec2f96f6b 100644 --- a/R/plotly.R +++ b/R/plotly.R @@ -388,7 +388,7 @@ plotlyMainBundle <- function() { plotlyHTMLWidget <- function() { htmltools::htmlDependency( "plotlyjs-binding", packageVersion("plotly"), - src = depPath(".."), + src = system.file('htmlwidgets', package = 'plotly'), script = "plotly.js" ) }