plotlyjs reuse window; plotlyjs closeall; closes #567
This commit is contained in:
parent
376ee02041
commit
0ab37f49fa
@ -40,7 +40,11 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function _create_backend_figure(plt::Plot{PlotlyJSBackend})
|
function _create_backend_figure(plt::Plot{PlotlyJSBackend})
|
||||||
PlotlyJS.plot()
|
if !isplotnull() && plt[:overwrite_figure] && isa(current().o, PlotlyJS.SyncPlot)
|
||||||
|
PlotlyJS.SyncPlot(PlotlyJS.Plot(), current().o.view)
|
||||||
|
else
|
||||||
|
PlotlyJS.plot()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -97,3 +101,10 @@ _show(io::IO, ::MIME"image/eps", plt::Plot{PlotlyJSBackend}) = plotlyjs_save_hac
|
|||||||
function _display(plt::Plot{PlotlyJSBackend})
|
function _display(plt::Plot{PlotlyJSBackend})
|
||||||
display(plt.o)
|
display(plt.o)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function closeall(::PlotlyJSBackend)
|
||||||
|
if !isplotnull() && isa(current().o, PlotlyJS.SyncPlot)
|
||||||
|
close(current().o)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user