response to click and drag events