Implements card dragging and dropping.