Distinguish between drag and click events in example