Changed tooltip position to detect edges and avoid them