Skip to content

Commit

Permalink
BUG: only start comm if IJulia is inited closes #181
Browse files Browse the repository at this point in the history
  • Loading branch information
sglyon committed Feb 27, 2018
1 parent 03207e1 commit 99b98f9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/displays/ijulia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,13 @@ prependtraces!(jd::JupyterDisplay, update::Associative=Dict(),
# --------------------------------------------- #

@require IJulia begin
init_notebook()
import IJulia
using IJulia.send_comm # needed for _call_js above to work

# set up the comms we will use to send js messages to be executed
global const _ijulia_eval_comm = Ref(IJulia.CommManager.Comm(:plotlyjs_eval))
global const _ijulia_return_comms = ObjectIdDict()
global const _ijulia_eval_comm = Ref{IJulia.CommManager.Comm{:plotlyjs_eval}}()
if IJulia.inited
_ijulia_eval_comm[] = IJulia.CommManager.Comm(:plotlyjs_eval)
end
init_notebook()

function IJulia.display_dict(p::JupyterPlot)
if p.view.displayed
Expand Down

0 comments on commit 99b98f9

Please sign in to comment.