Atom fixes
This commit is contained in:
parent
1636587a82
commit
fb708bed90
@ -124,22 +124,27 @@ end
|
|||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
function setup_atom()
|
function setup_atom()
|
||||||
@require Atom begin
|
# @require Atom begin
|
||||||
import Atom, Media
|
if isatom()
|
||||||
|
# @eval import Atom, Media
|
||||||
|
@eval import Atom
|
||||||
|
|
||||||
# connects the render function
|
# connects the render function
|
||||||
Media.media{T <: Union{GadflyBackend,ImmerseBackend,PyPlotBackend,GRBackend}}(Plot{T}, Media.Plot)
|
for T in (GadflyBackend,ImmerseBackend,PyPlotBackend,GRBackend)
|
||||||
|
Atom.Media.media(Plot{T}, Atom.Media.Plot)
|
||||||
|
end
|
||||||
|
# Atom.Media.media{T <: Union{GadflyBackend,ImmerseBackend,PyPlotBackend,GRBackend}}(Plot{T}, Atom.Media.Plot)
|
||||||
|
|
||||||
# Atom.displaysize(::AbstractPlot) = (535, 379)
|
# Atom.displaysize(::AbstractPlot) = (535, 379)
|
||||||
# Atom.displaytitle(plt::AbstractPlot) = "Plots.jl (backend: $(backend(plt)))"
|
# Atom.displaytitle(plt::AbstractPlot) = "Plots.jl (backend: $(backend(plt)))"
|
||||||
|
|
||||||
# this is like "display"... sends an html div with the plot to the PlotPane
|
# this is like "display"... sends an html div with the plot to the PlotPane
|
||||||
function Media.render(pane::Atom.PlotPane, plt::Plot)
|
function Atom.Media.render(pane::Atom.PlotPane, plt::Plot)
|
||||||
Media.render(pane, Atom.div(Atom.d(), Atom.HTML(stringmime(MIME("text/html"), plt))))
|
Atom.Media.render(pane, Atom.div(Atom.d(), Atom.HTML(stringmime(MIME("text/html"), plt))))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# function Media.render(pane::Atom.PlotPane, plt::Plot{PlotlyBackend})
|
# function Atom.Media.render(pane::Atom.PlotPane, plt::Plot{PlotlyBackend})
|
||||||
# html = Media.render(pane, Atom.div(Atom.d(), Atom.HTML(stringmime(MIME("text/html"), plt))))
|
# html = Media.render(pane, Atom.div(Atom.d(), Atom.HTML(stringmime(MIME("text/html"), plt))))
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -205,7 +205,7 @@ function fakedata(sz...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
isijulia() = isdefined(Main, :IJulia) && Main.IJulia.inited
|
isijulia() = isdefined(Main, :IJulia) && Main.IJulia.inited
|
||||||
isatom() = isdefined(Main, :Atom) && Atom.isconnected()
|
isatom() = isdefined(Main, :Atom) && Main.Atom.isconnected()
|
||||||
|
|
||||||
istuple(::Tuple) = true
|
istuple(::Tuple) = true
|
||||||
istuple(::Any) = false
|
istuple(::Any) = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user