Fix bug when clicking on a point when hte viewport is shifted.