You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello !
I've tested your librairy, and I'm really missing a feature to be able to do what I want with it: I'd like to have access to the DomNode in the DataNode object.
For example, when you click on a circle, I'd like to be able to add an attribute to it, so I'd need access to the tag for this circle.
I'd like to know if it's possible to add this tag to the content of the __dataNode.
If not, perhaps you already have a technique I don't know about for accessing the node?
Thanks in advance for your reply!
The text was updated successfully, but these errors were encountered:
@justinqllvr when you click on a node, the callback returns the node object you've clicked on. Within this object, if you access node.__dataNode.id it gives you the unique id of that node.
Using this id you can find the corresponding DOM element by searching for document.getElementById(`circle-${id}`).
However, I would recommend against this approach. The internal DOM structure of this component should not be tampered with as it may have unpredictable results. Why do you need to access the DOM element? Can you perhaps achieve your intention in another way?
Hello !
I've tested your librairy, and I'm really missing a feature to be able to do what I want with it: I'd like to have access to the DomNode in the DataNode object.
For example, when you click on a circle, I'd like to be able to add an attribute to it, so I'd need access to the tag for this circle.
I'd like to know if it's possible to add this tag to the content of the __dataNode.
If not, perhaps you already have a technique I don't know about for accessing the node?
Thanks in advance for your reply!
The text was updated successfully, but these errors were encountered: