-
Notifications
You must be signed in to change notification settings - Fork 22
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
interactions broken on new Makie #82
Comments
I tried to look into this a bit. Didn't get to any solution, but the additional info might be helpful. For the case of node click handlers, nothing happens because of the last if statement below always being false. It seems that a click on a node used to give back the Scatter plot of the nodes, and now it returns a Mesh. In MakieOrg/Makie.jl#1658 So what is this Mesh that it returns, and how do we get the Scatter plot of nodes back with |
Thanks for bringing this up. I played around a bit but could not resolve it yet. Using the simple code below you can see that the interactions still work but the reportet elements are infact not the ones below the cursor but a bit offset. However both node and edge interactions work. Maybe there is some problem with whether the mouse position is calculated with respect to the axis or the figure? g = wheel_graph(10)
f, ax, p = graphplot(g,
edge_width = [2.0 for i in 1:ne(g)],
edge_color = [colorant"gray" for i in 1:ne(g)],
node_size = [10 for i in 1:nv(g)],
node_color = [colorant"red" for i in 1:nv(g)])
hidedecorations!(ax); hidespines!(ax)
deregister_interaction!(ax, :rectanglezoom)
function node_hover_action(state, idx, event, axis)
p.node_size[][idx] = state ? 20 : 10
p.node_size[] = p.node_size[] # trigger observable
end
nhover = NodeHoverHandler(node_hover_action)
register_interaction!(ax, :nhover, nhover)
function edge_hover_action(state, idx, event, axis)
p.edge_width[][idx]= state ? 5.0 : 2.0
p.edge_width[] = p.edge_width[] # trigger observable
end
ehover = EdgeHoverHandler(edge_hover_action)
register_interaction!(ax, :ehover, ehover) |
I checked, and this example now works well on the newly released Makie v0.17.4. Thanks for tracking the issue upstream! |
I saw that #80 addd Makie 0.17 support. However it seems that with Makie 0.17 the interaction examples from http://juliaplots.org/GraphMakie.jl/dev/generated/interactions/ don't work anymore.
This is the code I use, identical to the docs except for using GLMakie, and adding a log statement to the event handlers.
If I then downgrade to the previous GraphMakie, v0.3.4, which brings along GLMakie v0.5.5, the interactions work again.
The text was updated successfully, but these errors were encountered: