Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,12 @@
{
"name": "Patrick Jaap",
"type": "Other"
},
{
"affiliation": "European XFEL",
"name": "James Wrigley",
"orcid": "0009-0003-6525-7413",
"type": "Other"
}
],
"upload_type": "software"
Expand Down
9 changes: 6 additions & 3 deletions src/backends/plotly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1109,10 +1109,13 @@ function plotly_html_body(plt, style = nothing)
uuid = UUIDs.uuid4()
html = """
<div id=\"$(uuid)\" style=\"$(style)\"></div>
<script src="https://requirejs.org/docs/release/$(_requirejs_version)/minified/require.js" onload="plots_jl_plotly_init()"></script>
<script>
$(requirejs_prefix)
$(js_body(plt, uuid))
$(requirejs_suffix)
function plots_jl_plotly_init() {
$(requirejs_prefix)
$(js_body(plt, uuid))
$(requirejs_suffix)
}
</script>
"""
html
Expand Down
2 changes: 2 additions & 0 deletions src/init.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ use fixed version of Plotly instead of the latest one for stable dependency
"""
const _plotly_min_js_filename = "plotly-2.6.3.min.js"

const _requirejs_version = v"2.3.7"

"""
Whether to use local embedded or local dependencies instead of CDN.
"""
Expand Down
Loading