I have a function that builds my d3 display, within it is a function called update()
which actually deals with the nodes.
The function can be seen here
As you can see, the svg
tree is created and then the update()
function is run, displaying the tree nodes.
When a tree node with a certain data attribute is clicked, an html
form
is appended to the screen which allows a user to add data relating to that node. The user enters the data, clicks 'save' which has a jQuery
based event
handler attached which updates the data source.
I need to then trigger the tree to update with the node showing the new data.
I'm unsure how to trigger this update()
function from an external function. I don't want to have to rebuild the entire tree every time, just redraw the nodes to show the new data.
Where is the gap in my understanding of how to do this?