repaired the click event, but still got a problem with the internal calculation (will be fixed in the evening)

added a linesegment to testview, to show the problem.