Question

I am facing some issue with the getNodes() method. Currently if i want any particular node, i can use getNodes() method with specified ID as parameter. It returns me the object of the nodes associated with that ID. But, when i made some changes with this object and redraw the graph then it will not affect. Other side, if i use iterNodes() method and found specific id, then i am able to make changes with that object. So, for every single node attribute change i will not iterate with all the rendered node, it will be good to have specific object with getNodes() method. If anybody fix this issue or something knows about it then please help me. Thanks in advance.

Was it helpful?

Solution

Searched a bit and found following - getNodes() method returns clone of node. If you want actual node for manipulation then you need to add extra function into the library which will return actual node for manipulation. Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top