Function for recalculating position of clicks/ dbclicks