-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Mouse hover event handler missing! #365
Comments
I tried these methods, which are working fine, |
@bumbeishvili Do you have any updates on this? |
@dreambold it's chart.nodeUpdate(function(d){
const currentlyHoveredElement = this;
/*
You can then use the tip lib of your choice.
For tippy, it would be something like tippy(this,{ additionalArguments})
*/
}) |
I already tried it, which doesn't seem to work for me
|
Can you link a reproduced example, where you tried You can fork one of the examples linked in readme |
Here's the screenshot of my code, which I tried to output in the console. Nothing works, unfortunately Thank you for your input here, @bumbeishvili |
Am adding the full code below:
|
https://stackblitz.com/edit/js-d38vwy?file=index.html |
@dreambold you need to include a tippy library and then uncomment this line It's not part of org-chart library, but entirely independent thing, it's up to you how to implement it, org chart just gives you an element reference which you will need to append the tip to ![]() |
Yes, I understand it, but nothing prints in the console when I hover mouse over the elements, as you can see in the code, I used console log |
@dreambold nodeUpdate is not invoked on hover, but it's invoked when the node is being updated (content changes, node expanded or collapsed) The only responsibility for it is to expose the node. And it's up to you to attach hover events and handlers to it like you'd do for normal HTML elements. I've checked Stackblitz and three element is logged (like it should) (don't open browser console, use their built in console) |
I was able to attach the event listener to the nodes, awesome! Appreciate your help! |
Am using this package to draw an org, it works fine, but just one thing is missing,
tooltip on hover
I think many others want this, I have checked some issues in the repository and @bumbeishvili said to use the
onNodeUpdate
event, but it doesn't even exist in the package source, I checked.The only thing is there,
onNodeClick
, which works fine.Is there a quick solution to capture the
mouseover
event???Any help would be greatly appreciated, thank you!
The text was updated successfully, but these errors were encountered: