Home > @jsplumbtoolkit/core > Path > each
#
Path.each() methodIterates 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;
#
ParametersParameter | Type | Description |
---|---|---|
fn | (i: number, p: ShortestPathComponent) => any | Function to call for each step. |
Returns:
void