Home > @jsplumbtoolkit/core > Path > each
Path.each() method
Iterates through the path one step at a time. Each step consists of an object containing a vertex
, and, for all entries except the first, an edge
member, which supplies the Edge that links to the Vertex (which is why it is null for the first entry).
Signature:
each(fn: (i: number, p: ShortestPathComponent) => any): void;
Parameters
Parameter | Type | Description |
---|---|---|
fn | (i: number, p: ShortestPathComponent) => any | Function to call for each step. |
Returns:
void