docs(readme): add getOutgoers function, explain removeElements closes #349

This commit is contained in:
moklick
2020-07-21 10:48:52 +02:00
parent 289dad0cef
commit 5e12dd7eff

View File

@@ -482,7 +482,7 @@ Returns true if element is a node
### removeElements
Returns elements without the elements from `elementsToRemove`
Returns an array of elements without the ones from `elementsToRemove`. It also removes all incoming/outgoing edges if you just pass one or multiple nodes
`removeElements = (elementsToRemove: Elements, elements: Elements): Elements`
@@ -492,6 +492,12 @@ Returns elements array with added edge
`addEdge = (edgeParams: Edge, elements: Elements): Elements`
### getOutgoers
Returns all direct child nodes of the passed node
`getOutgoers = (node: Node, elements: Elements): Node[]`
You can use these function as seen in [this example](/example/src/Overview/index.js#L40-L41) or use your own ones.