Skip to main content

Home > @jsplumbtoolkit/core > Path > getCost

Path.getCost() method

Gets the cost of the given path. Edges in the Toolkit can have a cost associated with them (the default is 1), and so the cost of any given path is the sum of the cost of all of the edges in the path.

Signature:

getCost(): number;

Returns:

number

Total cost of the Path. Null if path does not exist.