embeddable_html (#3559)
This commit is contained in:
parent
019a742c84
commit
203af856cd
@ -986,7 +986,7 @@ end
|
||||
|
||||
|
||||
function _show(io::IO, ::MIME"text/html", plt::Plot{PlotlyBackend})
|
||||
write(io, standalone_html(plt))
|
||||
write(io, embeddable_html(plt))
|
||||
end
|
||||
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ _show(io::IO, mime::MIME"application/vnd.plotly.v1+json", plt::Plot{PlotlyJSBack
|
||||
html_head(plt::Plot{PlotlyJSBackend}) = plotly_html_head(plt)
|
||||
html_body(plt::Plot{PlotlyJSBackend}) = plotly_html_body(plt)
|
||||
|
||||
_show(io::IO, ::MIME"text/html", plt::Plot{PlotlyJSBackend}) = write(io, standalone_html(plt))
|
||||
_show(io::IO, ::MIME"text/html", plt::Plot{PlotlyJSBackend}) = write(io, embeddable_html(plt))
|
||||
|
||||
_display(plt::Plot{PlotlyJSBackend}) = display(plotlyjs_syncplot(plt))
|
||||
|
||||
|
||||
@ -19,6 +19,10 @@ function standalone_html(plt::AbstractPlot; title::AbstractString = get(plt.attr
|
||||
"""
|
||||
end
|
||||
|
||||
function embeddable_html(plt::AbstractPlot)
|
||||
html_head(plt) * html_body(plt)
|
||||
end
|
||||
|
||||
function open_browser_window(filename::AbstractString)
|
||||
@static if Sys.isapple()
|
||||
return run(`open $(filename)`)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user