Added click event and initial local position