when a WGLMakie App is served with Bonito, zooming in on a plot works, but when a standalone .html file is created with export_static, it doesn’t. presumably a Julia server is needed for this functionality.
i post because i’m curious what it would take to get this to work. is there a workaround like for DataInspector? or maybe there is some other JS code i could execute??
more generally, is there a roadmap for implementing more of WGLMakie in javascript and finalizing the API so that it is no longer experimental? doing so is a bit outside my expertise but i’d be happy to help with some guidance. Gadfly’s support for interactive standalone SVGs is a killer feature and the sole reason i sometimes use it instead of Makie.
using WGLMakie, Bonito
app = App() do session
fig, ax, sc = scatter(rand(10), rand(10))
return DOM.div(fig)
end
export_static("mwe.html", app) # zoom doesn't work :(
Bonito.Server(app, "0.0.0.0", 80) # zoom does work :)
so that makes three of us that really want to zoom and pan on a static plot. i do have a little bit of time to dabble if you can guide me even further. as is, zooming the entire scene like that is not useful. a couple questions:
how would you architect a solution to put that code inside WGLMakie so that it just worked out-of-the-box for everyone?
in a non-static (ie with a julia server) plot, one can programmatically zoom by calling limits!. can one call that function from within javascript? equivalently, i know you can pass an observable’s value from julia to javascript, but is there a way to set an observable’s value from within javascript? if so, that could provide a means to zoom.