Add click and drag event to ruler