modified the drag function of icon and create shadow function