the drag function has been finished