Fix PlotlyJS integration with WebIO

Fixes #2272.
This commit is contained in:
Travis DePrato 2019-11-26 12:55:27 -05:00 committed by GitHub
parent d2ca5e3bf3
commit fa6f0a6b00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,8 +42,8 @@ _display(plt::Plot{PlotlyJSBackend}) = display(plotlyjs_syncplot(plt))
@require WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29" begin @require WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29" begin
function WebIO.render(plt::Plot{PlotlyJSBackend}) function WebIO.render(plt::Plot{PlotlyJSBackend})
prepare_output(plt) plt_html = sprint(show, MIME("text/html"), x)
WebIO.render(plt.o) return WebIO.render(dom"div"(innerHTML=plt_html))
end end
end end