add the drag function between rack and the map