path.getTotalLength()

path.getPointAtLength(fraction)

to get a point.x and point.y at the fraction position.

But what if we have point.x and point.y on a path (click with event) and would like to calculate the fraction?

So, is there an opposite of getPointAtlength: getLengthAtPoint?

The goal is to calculate the entries in keyPoints interactively.