complete the drag and resize