VivaGraphJS
VivaGraphJS copied to clipboard
change appearence of a node dynamically
Is it possible to change the appearance of a node dynamically?? After graph has been rendered.
Yes it is possible.
You can use the following function, and if you give it the id of an existing node, it will update that node.
graph.addNode( id_of_existing_node, some_node_related_data);
graph.addNode works very well outside of an event call. But i don't know why, when a node is changed dynamically during a event, it has strange behave. I think it's related to the comment of dynamicNodeChange.html demo file : // This will trigger UI update. However this is not perfect // If update happens in the middle of user interaction with node // most likely it will cause input manager to choke
but i cannot find any workaround yet .. :(