Fix the position calculation of dragging view.