From fb40ed1f594189df3a5a41f8fb2bc6241a6ad9c6 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Wed, 17 Jun 2020 11:17:37 +0200 Subject: [PATCH] Plotly fixed version (#2779) * Fixed version for plotly.js dependency * Fixed version for plotly.js dependency - .gitignore update --- .gitignore | 2 +- deps/build.jl | 8 ++++---- src/backends/plotly.jl | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 6e5cdbe6..c653453c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ .DS_Store examples/.ipynb_checkpoints/* examples/meetup/.ipynb_checkpoints/* -deps/plotly-latest.min.js +deps/plotly-* deps/build.log deps/deps.jl Manifest.toml diff --git a/deps/build.jl b/deps/build.jl index a8cf81ff..b174ab93 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -1,12 +1,12 @@ -#TODO: download https://cdn.plot.ly/plotly-latest.min.js to deps/ if it doesn't exist +#TODO: download https://cdn.plot.ly/plotly-1.54.2.min.js to deps/ if it doesn't exist file_path = "" if get(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL", "false") == "true" global file_path - local_fn = joinpath(dirname(@__FILE__), "plotly-latest.min.js") + local_fn = joinpath(dirname(@__FILE__), "plotly-1.54.2.min.js") if !isfile(local_fn) - @info("Cannot find deps/plotly-latest.min.js... downloading latest version.") - download("https://cdn.plot.ly/plotly-latest.min.js", local_fn) + @info("Cannot find deps/plotly-1.54.2.min.js... downloading latest version.") + download("https://cdn.plot.ly/plotly-1.54.2.min.js", local_fn) isfile(local_fn) && (file_path = local_fn) else file_path = local_fn diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 810b72e3..9bb1f27e 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -828,7 +828,7 @@ const ijulia_initialized = Ref(false) function plotly_html_head(plt::Plot) local_file = ("file:///" * plotly_local_file_path) plotly = - use_local_dependencies[] ? local_file : "https://cdn.plot.ly/plotly-latest.min.js" + use_local_dependencies[] ? local_file : "https://cdn.plot.ly/plotly-1.54.2.min.js" include_mathjax = get(plt[:extra_plot_kwargs], :include_mathjax, "") mathjax_file = include_mathjax != "cdn" ? ("file://" * include_mathjax) : "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"