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

no access to mouse event on node / link hover #550

Open
Anchel123 opened this issue Nov 7, 2024 · 1 comment
Open

no access to mouse event on node / link hover #550

Anchel123 opened this issue Nov 7, 2024 · 1 comment

Comments

@Anchel123
Copy link

Describe the bug

when i'm using the onNodeHover event,
it don't seem to give me the mouse event only the node and the prev node.

Expected behavior

that the onNodeHover event will get the mouse event,
like onNodeClick.

Screenshots

image

@vasturiano
Copy link
Owner

@Anchel123 thanks for reaching out.

This is intentional, and it's because there is actually no pointer hover event that leads to the triggering of this function. Underneath the surface this is not using html DOM elements nor SVG, for which there are these types of events available. It's using canvas elements for which there is only a single element for the whole graph. The nodes/links hovered are inferred programmatically from the position of the mouse on the canvas at any given point, thus there is no actual underlying pointer event available to provide here.

Hope this makes sense.

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

No branches or pull requests

2 participants