handle click events on pan