Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make SVG interactivity work with Atom #1115

Closed
bjarthur opened this issue Mar 17, 2018 · 8 comments
Closed

make SVG interactivity work with Atom #1115

bjarthur opened this issue Mar 17, 2018 · 8 comments

Comments

@bjarthur
Copy link
Member

anyone understand how the Juno interface works?

@Mattriks
Copy link
Member

@bjarthur
Copy link
Member Author

bjarthur commented Apr 4, 2018

@pfitzseb has a nice fix

@bjarthur
Copy link
Member Author

bjarthur commented Apr 4, 2018

specifically, in src/Gadfly.js replace:

@render Juno.PlotPane p::Plot begin
    x, y = Juno.plotsize()
    set_default_plot_size(x*Gadfly.px, y*Gadfly.px)
    HTML(stringmime("text/html", p))
end

with:

function Juno.render(pp::Juno.PlotPane, p::Plot)
    x, y = Juno.plotsize()
    set_default_plot_size(x*Gadfly.px, (y-1)*Gadfly.px)
    w = Juno.Atom.blinkplot()
    Juno.Atom.Blink.body!(w, HTML(stringmime("text/html", p)))
end

@JianghuiDu
Copy link

My Gadfly.js doesn't have @render at all. Using Julia 1.1.0. Is there a fix?

@bjarthur
Copy link
Member Author

sadly Gadfly still doesn't work with Juno. see #1256 for a possible solution.

@pfitzseb
Copy link

Should work once JunoLab/Atom.jl#243 is merged. I was sure I'd tried that before and it didn't make a difference, but it does. Sorry for the false alarm in #1256.

@bjarthur
Copy link
Member Author

i can plot successfully, but the built-into-Gadfly interactivity still does not work. specifically, while hovering in the plot plane one should be able to press "?" and get a help panel explaining that one can pan and zoom with various keys.

atom 1.43.0, julia 1.3, dev Gadfly

is there something that we need to add to Gadfly to make this work?

@bjarthur
Copy link
Member Author

doh, it works as is with dev Atom. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants