function getClosestPointOnConnection(position, connection) {
  var segment = getClosestSegment(position, connection);

  return perpendicularFoot(position, segment);
}
Returns the point with the closest distance that is on the connection path.

@param {Point} position
@param {Connection} connection
@return {Point}