Improve logic of detecting selected point

Now we chose nearest point to tapped point