Added a onBeforeRemoveNode method which is triggered right before removing a Graph.Node.
Use case is when each ST node has an associated complex DOM element (think of an overlay panel) and when removing a node (with children) the only hook to delete the DOM elements would be the onComplete (when removal is animated), which is only fired for that specific node and not for each one of the removed nodes.
Thanks for including this change.
Added a onBeforeRemoveNode method which is triggered right before rem…
…oving a <Graph.Node>.
- eachBFS: fixed a bug that caused an exception in case the supplied …
…node id didn't exist in the graph.
- eachLevel: added the possibility of breaking the iteration.
Why was this check added here?
In case the user calls eachBFS with a non-existent nodeId, there's no check against the return value of getNode and so the next line will throw an error
Thank you for contributing! :)