Move code to draggedToEdge() method