Skip to content

Commit cb51a67

Browse files
committed
Add new destroy method to README.md
1 parent f4df3bd commit cb51a67

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Uses [@hpcc-js/wasm](https://github.com/hpcc-systems/hpcc-js-wasm) to do a layou
9595
* [Accessing Elements of the Generated Graph](#accessing-elements-of-the-generated-graph)
9696
* [Accessing the Extracted Data](#accessing-the-extracted-data)
9797
* [Modifying an Existing Graph and Animating the Changes](#modifying-an-existing-graph-and-animating-the-changes)
98+
* [Destroying the Graphviz Renderer](#destroying-the-graphviz-renderer)
9899

99100
### Defining the @hpcc-js/wasm Script Tag
100101

@@ -473,6 +474,12 @@ Removes the node currently drawn with [<i>graphviz</i>.<b>drawNode</b>](#graphvi
473474

474475
Returns a [selection](https://github.com/d3/d3-selection#selection) containing the node currently being drawn. The selection is empty if no node has been drawn or the lastest drawn node has been inserted into the graph data with [<i>graphviz</i>.<b>insertDrawnNode</b>](#graphviz_insertDrawnNode).
475476

477+
### Destroying the Graphviz Renderer
478+
479+
<a name="graphviz_destroy" href="#graphviz_destroy">#</a> <i>graphviz</i>.<b>destroy</b>() [<>](https://github.com/magjac/d3-graphviz/blob/master/src/destroy.js "Source")
480+
481+
Removes the graphviz renderer from the element it was created on, terminates any active decicated web worker and closes any port connected to a shared web worker.
482+
476483
## Examples
477484

478485
* [Basic Example](http://bl.ocks.org/magjac/a23d1f1405c2334f288a9cca4c0ef05b)

0 commit comments

Comments
 (0)