fix WebIO error for PlotlyJS

This commit is contained in:
Daniel Schwabeneder 2020-04-16 13:22:36 +02:00
parent 3b3a09302f
commit 2d29ab7017

View File

@ -40,11 +40,9 @@ _show(io::IO, ::MIME"text/html", plt::Plot{PlotlyJSBackend}) = write(io, standal
_display(plt::Plot{PlotlyJSBackend}) = display(plotlyjs_syncplot(plt)) _display(plt::Plot{PlotlyJSBackend}) = display(plotlyjs_syncplot(plt))
@require WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29" begin function PlotlyJS.WebIO.render(plt::Plot{PlotlyJSBackend})
function WebIO.render(plt::Plot{PlotlyJSBackend}) plt_html = sprint(show, MIME("text/html"), plt)
plt_html = sprint(show, MIME("text/html"), plt) return PlotlyJS.WebIO.render(PlotlyJS.WebIO.dom"div"(innerHTML=plt_html))
return WebIO.render(WebIO.dom"div"(innerHTML=plt_html))
end
end end
function closeall(::PlotlyJSBackend) function closeall(::PlotlyJSBackend)